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
public class BasicAttribute extends Object implements SingularAttribute, Keyable
Contract for a basic, singular attribute.
-
-
Constructor Summary
Constructors Constructor Description BasicAttribute(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumn(Column column)
Add a column to the container.Serializable
build()
Builds the specified binded class type.BasicAttribute
deepCopy()
Creates a new, deep-copied instance of this objectList<Column>
getColumns()
Get all columns that are part of this propertyString
getName()
Get the name of the attributeTypeSpecification
getType()
boolean
isKey()
Get whether the attribute is already participatig in a key.void
setInsertable(boolean insertable)
void
setKey(boolean key)
Set whether this attribute should or shouldn't participate as a key attribute.void
setName(String name)
Set the name of the attributevoid
setType(TypeSpecification type)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.envers.boot.model.ColumnContainer
addColumnsFromValue
-
-
-
-
Constructor Detail
-
BasicAttribute
public BasicAttribute(String name, String type, boolean insertable, boolean key)
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
public BasicAttribute(String name, String type, boolean insertable, boolean updatable, boolean key)
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
public BasicAttribute(BasicAttribute other)
A copy constructor that performs a deep-copy.- Parameters:
other
- the object to be copied
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:Attribute
Get the name of the attribute
-
setName
public void setName(String name)
Description copied from interface:Attribute
Set the name of the attribute
-
setKey
public void setKey(boolean key)
Description copied from interface:Keyable
Set whether this attribute should or shouldn't participate as a key attribute.
-
isKey
public boolean isKey()
Description copied from interface:Keyable
Get whether the attribute is already participatig in a key.
-
getColumns
public List<Column> getColumns()
Description copied from interface:ColumnContainer
Get all columns that are part of this property- Specified by:
getColumns
in interfaceColumnContainer
- Returns:
- unmodifiable list of property columns
-
addColumn
public void addColumn(Column column)
Description copied from interface:ColumnContainer
Add a column to the container.- Specified by:
addColumn
in interfaceColumnContainer
- Parameters:
column
- the column, must not benull
-
setInsertable
public void setInsertable(boolean insertable)
-
getType
public TypeSpecification getType()
-
setType
public void setType(TypeSpecification type)
-
deepCopy
public BasicAttribute deepCopy()
Description copied from interface:Cloneable
Creates a new, deep-copied instance of this object
-
build
public Serializable build()
Description copied from interface:Bindable
Builds the specified binded class type.- Specified by:
build
in interfaceBindable<Serializable>
- Returns:
- instance of the bindable class type, never
null
-
-