Package javax.jdo.metadata
Interface UniqueMetadata
- All Superinterfaces:
Metadata
Represents a unique constraint.
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionAccessor for all column(s) defined on the unique constraint.Accessor for whether deferred.Accessor for all fields/properties defined on the unique constraint.getName()
Accessor for the constraint name.int
Accessor for the number of columns defined for this unique constraint.int
Accessor for the number of fields/properties defined for this unique constraint.getTable()
Accessor for the name of the table.Add a new column for this unique constraint.newFieldMetadata
(String name) Add a new field for this unique constraint.newPropertyMetadata
(String name) Add a new property for this unique constraint.setDeferred
(boolean def) Method to set whether the constraint is deferred.Method to set the name of the constraint.Method to set the table name.Methods inherited from interface javax.jdo.metadata.Metadata
getExtensions, getNumberOfExtensions, getParent, newExtensionMetadata
-
Method Details
-
setName
Method to set the name of the constraint.- Parameters:
name
- Name of the constraint- Returns:
- This metadata object
-
getName
String getName()Accessor for the constraint name.- Returns:
- The constraint name
-
setTable
Method to set the table name.- Parameters:
table
- Table name- Returns:
- This metadata object
-
getTable
String getTable()Accessor for the name of the table.- Returns:
- The name
-
setDeferred
Method to set whether the constraint is deferred.- Parameters:
def
- Deferred?- Returns:
- This metadata object
-
getDeferred
Boolean getDeferred()Accessor for whether deferred.- Returns:
- Deferred?
-
getColumns
ColumnMetadata[] getColumns()Accessor for all column(s) defined on the unique constraint.- Returns:
- The column(s)
-
newColumnMetadata
ColumnMetadata newColumnMetadata()Add a new column for this unique constraint.- Returns:
- The ColumnMetadata
-
getNumberOfColumns
int getNumberOfColumns()Accessor for the number of columns defined for this unique constraint.- Returns:
- The number of columns
-
getMembers
MemberMetadata[] getMembers()Accessor for all fields/properties defined on the unique constraint.- Returns:
- The members
-
getNumberOfMembers
int getNumberOfMembers()Accessor for the number of fields/properties defined for this unique constraint.- Returns:
- The number of members
-
newFieldMetadata
Add a new field for this unique constraint.- Parameters:
name
- Name of the field- Returns:
- The FieldMetadata
-
newPropertyMetadata
Add a new property for this unique constraint.- Parameters:
name
- Name of the property- Returns:
- The PropertyMetadata
-