Package org.hibernate.envers.boot.model
Class BasicAttribute
java.lang.Object
org.hibernate.envers.boot.model.BasicAttribute
- All Implemented Interfaces:
Attribute,Bindable<Serializable>,Cloneable<Attribute>,ColumnContainer,Keyable,SingularAttribute
Contract for a basic, singular attribute.
-
Constructor Summary
ConstructorsConstructorDescriptionBasicAttribute(String name, String type, boolean insertable, boolean key) Create a basic attributeBasicAttribute(String name, String type, boolean insertable, boolean updatable, boolean key) Create a basic attributeBasicAttribute(String name, String type, boolean insertable, boolean updatable, boolean key, String explicitType) Creates a basic attributeBasicAttribute(String name, String type, boolean insertable, boolean key, String explicitType) Create a basic attributeBasicAttribute(BasicAttribute other) A copy constructor that performs a deep-copy. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a column to the container.build()Builds the specified binded class type.deepCopy()Creates a new, deep-copied instance of this objectGet all columns that are part of this propertygetName()Get the name of the attributegetType()booleanisKey()Get whether the attribute is already participatig in a key.voidsetInsertable(boolean insertable) voidsetKey(boolean key) Set whether this attribute should or shouldn't participate as a key attribute.voidSet the name of the attributevoidsetType(TypeSpecification type) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.envers.boot.model.ColumnContainer
addColumnsFromValue
-
Constructor Details
-
BasicAttribute
Create a basic attribute- Parameters:
name- the attribute nametype- the attribute typeinsertable- whether the attribute is insertablekey- whether the attribute participates in a key
-
BasicAttribute
public BasicAttribute(String name, String type, boolean insertable, boolean key, String explicitType) Create a basic attribute- Parameters:
name- the attribute nametype- the attribute typeinsertable- whether the attribute is insertablekey- whether the attribute participates in a keyexplicitType- the explicit class type
-
BasicAttribute
Create a basic attribute- Parameters:
name- the attribute nametype- the attribute typeinsertable- whether the attribute is insertableupdatable- whether the attribute is updatablekey- whether the attribute participates in a key
-
BasicAttribute
public BasicAttribute(String name, String type, boolean insertable, boolean updatable, boolean key, String explicitType) Creates a basic attribute- Parameters:
name- the attribute nametype- the attribute typeinsertable- whether the attribute is insertableupdatable- whether the attribute is updatablekey- whether the attribute participates in a keyexplicitType- the explicit class type
-
BasicAttribute
A copy constructor that performs a deep-copy.- Parameters:
other- the object to be copied
-
-
Method Details
-
getName
Description copied from interface:AttributeGet the name of the attribute -
setName
Description copied from interface:AttributeSet the name of the attribute -
setKey
public void setKey(boolean key) Description copied from interface:KeyableSet whether this attribute should or shouldn't participate as a key attribute. -
isKey
public boolean isKey()Description copied from interface:KeyableGet whether the attribute is already participatig in a key. -
getColumns
Description copied from interface:ColumnContainerGet all columns that are part of this property- Specified by:
getColumnsin interfaceColumnContainer- Returns:
- unmodifiable list of property columns
-
addColumn
Description copied from interface:ColumnContainerAdd a column to the container.- Specified by:
addColumnin interfaceColumnContainer- Parameters:
column- the column, must not benull
-
setInsertable
public void setInsertable(boolean insertable) -
getType
-
setType
-
deepCopy
Description copied from interface:CloneableCreates a new, deep-copied instance of this object -
build
Description copied from interface:BindableBuilds the specified binded class type.- Specified by:
buildin interfaceBindable<Serializable>- Returns:
- instance of the bindable class type, never
null
-