Package org.apache.openejb.jee.jpa
Class Column
- java.lang.Object
-
- org.apache.openejb.jee.jpa.Column
-
public class Column extends Object
Target({METHOD, FIELD}) @Retention(RUNTIME) public @interface Column { String name() default ""; boolean unique() default false; boolean nullable() default true; boolean insertable() default true; boolean updatable() default true; String columnDefinition() default ""; String table() default ""; int length() default 255; int precision() default 0; // decimal precision int scale() default 0; // decimal scale }Java class for column complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="column"> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <attribute name="column-definition" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="insertable" type="{http://www.w3.org/2001/XMLSchema}boolean" /> <attribute name="length" type="{http://www.w3.org/2001/XMLSchema}int" /> <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="nullable" type="{http://www.w3.org/2001/XMLSchema}boolean" /> <attribute name="precision" type="{http://www.w3.org/2001/XMLSchema}int" /> <attribute name="scale" type="{http://www.w3.org/2001/XMLSchema}int" /> <attribute name="table" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="unique" type="{http://www.w3.org/2001/XMLSchema}boolean" /> <attribute name="updatable" type="{http://www.w3.org/2001/XMLSchema}boolean" /> </restriction> </complexContent> </complexType>
-
-
Field Summary
Fields Modifier and Type Field Description protected StringcolumnDefinitionprotected Booleaninsertableprotected Integerlengthprotected Stringnameprotected Booleannullableprotected Integerprecisionprotected Integerscaleprotected Stringtableprotected Booleanuniqueprotected Booleanupdatable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetColumnDefinition()Gets the value of the columnDefinition property.IntegergetLength()Gets the value of the length property.StringgetName()Gets the value of the name property.IntegergetPrecision()Gets the value of the precision property.IntegergetScale()Gets the value of the scale property.StringgetTable()Gets the value of the table property.BooleanisInsertable()Gets the value of the insertable property.BooleanisNullable()Gets the value of the nullable property.BooleanisUnique()Gets the value of the unique property.BooleanisUpdatable()Gets the value of the updatable property.voidsetColumnDefinition(String value)Sets the value of the columnDefinition property.voidsetInsertable(Boolean value)Sets the value of the insertable property.voidsetLength(Integer value)Sets the value of the length property.voidsetName(String value)Sets the value of the name property.voidsetNullable(Boolean value)Sets the value of the nullable property.voidsetPrecision(Integer value)Sets the value of the precision property.voidsetScale(Integer value)Sets the value of the scale property.voidsetTable(String value)Sets the value of the table property.voidsetUnique(Boolean value)Sets the value of the unique property.voidsetUpdatable(Boolean value)Sets the value of the updatable property.
-
-
-
Field Detail
-
columnDefinition
protected String columnDefinition
-
insertable
protected Boolean insertable
-
length
protected Integer length
-
name
protected String name
-
nullable
protected Boolean nullable
-
precision
protected Integer precision
-
scale
protected Integer scale
-
table
protected String table
-
unique
protected Boolean unique
-
updatable
protected Boolean updatable
-
-
Constructor Detail
-
Column
public Column()
-
Column
public Column(String name)
-
-
Method Detail
-
getColumnDefinition
public String getColumnDefinition()
Gets the value of the columnDefinition property.- Returns:
- possible object is
String
-
setColumnDefinition
public void setColumnDefinition(String value)
Sets the value of the columnDefinition property.- Parameters:
value- allowed object isString
-
isInsertable
public Boolean isInsertable()
Gets the value of the insertable property.- Returns:
- possible object is
Boolean
-
setInsertable
public void setInsertable(Boolean value)
Sets the value of the insertable property.- Parameters:
value- allowed object isBoolean
-
getLength
public Integer getLength()
Gets the value of the length property.- Returns:
- possible object is
Integer
-
setLength
public void setLength(Integer value)
Sets the value of the length property.- Parameters:
value- allowed object isInteger
-
getName
public String getName()
Gets the value of the name property.- Returns:
- possible object is
String
-
setName
public void setName(String value)
Sets the value of the name property.- Parameters:
value- allowed object isString
-
isNullable
public Boolean isNullable()
Gets the value of the nullable property.- Returns:
- possible object is
Boolean
-
setNullable
public void setNullable(Boolean value)
Sets the value of the nullable property.- Parameters:
value- allowed object isBoolean
-
getPrecision
public Integer getPrecision()
Gets the value of the precision property.- Returns:
- possible object is
Integer
-
setPrecision
public void setPrecision(Integer value)
Sets the value of the precision property.- Parameters:
value- allowed object isInteger
-
getScale
public Integer getScale()
Gets the value of the scale property.- Returns:
- possible object is
Integer
-
setScale
public void setScale(Integer value)
Sets the value of the scale property.- Parameters:
value- allowed object isInteger
-
getTable
public String getTable()
Gets the value of the table property.- Returns:
- possible object is
String
-
setTable
public void setTable(String value)
Sets the value of the table property.- Parameters:
value- allowed object isString
-
isUnique
public Boolean isUnique()
Gets the value of the unique property.- Returns:
- possible object is
Boolean
-
setUnique
public void setUnique(Boolean value)
Sets the value of the unique property.- Parameters:
value- allowed object isBoolean
-
isUpdatable
public Boolean isUpdatable()
Gets the value of the updatable property.- Returns:
- possible object is
Boolean
-
-