Other name(s) : $attrib, $attr
( documentation for Telosys generator version 4.1.0 )
This object provides all information about an entity attribute
Each attribute is obtained from its entity class
Example :
#foreach( $attribute in $entity.attributes )
$attribute.name : $attribute.type
#end
Since : 2.0.0
Attributes and methods |
.booleanFalseValue : String
Returns the value to use for a boolean when is FALSE (eg to be stored in a database) |
.booleanTrueValue : String
Returns the value to use for a boolean when is TRUE (eg to be stored in a database) |
.databaseComment : String
Returns the database comment for the attribute (or a void string if none) |
.databaseDefaultValue : String
Returns the database default value for the attribute (or a void string if none) |
.databaseName : String
Returns the database name for the attribute (as defined in the model) |
.databaseSize : String
Returns the database size for the attribute |
.databaseType : String
Returns the database native type for the attribute (as defined in the model) |
.dateAfterValue : String
Returns the 'date after' value (for date validation) |
.dateBeforeValue : String
Returns the 'date before' value (for date validation) |
.defaultValue : String
Returns the default value for the attribute |
.entity : EntityInContext
Returns the entity owning the attribute |
.fkParts : List of 'fkPart' objects
Returns all the parts of Foreign Keys in which the attribute is involved. |
.fkPartsCount : int
Returns the number of FK parts in which the attribute is involved. |
.formattedName(int n) : String
Returns the attribute's name with trailing blanks in order to obtain the expected size |
.formattedType(int n) : String
Returns the attribute's type with trailing blanks in order to obtain the expected size |
.formattedWrapperType(int n) : String
Returns the attribute's wrapper type with trailing blanks in order to obtain the expected size |
.fullType : String
Returns the full type name |
.generatedValueAllocationSize : int
Returns the generated value allocation size usable in ORM like JPA or Doctrine (or 0 if not defined) |
.generatedValueInitialValue : int
Returns the generated value initial value usable in ORM like JPA or Doctrine (or 0 if not defined) |
.generatedValueSequenceName : String
Returns the 'sequence name' to use for a generated value (or a void string if none) |
.generatedValueStrategy : String
Returns the generated value strategy if any. |
.generatedValueTablePkValue : String
Returns the primary key (string value) that identifies the generated value in the table |
.getter : String
Returns the getter for the attribute |
.getterWithGetPrefix : String
Returns the getter for the attribute with always a 'get' prefix |
.hasDatabaseComment() : boolean
Returns TRUE if the attribute has a database comment defined in the model |
.hasDatabaseDefaultValue() : boolean
Returns TRUE if the attribute has a database default value |
.hasDatabaseName() : boolean
Returns TRUE if the attribute has a database name explicitly defined in the model |
.hasDatabaseType() : boolean
Returns TRUE if the attribute has a database type explicitly defined in the model |
.hasDateAfterValidation() : boolean
Returns TRUE if the attribute must be validated as a date AFTER a given date value |
.hasDateBeforeValidation() : boolean
Returns TRUE if the attribute must be validated as a date BEFORE a given date value |
.hasDateFutureValidation() : boolean
Returns TRUE if the attribute must be validated as a date in the future |
.hasDatePastValidation() : boolean
Returns TRUE if the attribute must be validated as a date in the past |
.hasDefaultValue() : boolean
Returns TRUE if there's a default value for the attribute (not void) |
.hasGeneratedValueAllocationSize() : boolean
Returns true if the attribute has a generated value allocation size |
.hasGeneratedValueInitialValue() : boolean
Returns true if the attribute has an initial value for the generated value |
.hasGeneratedValueSequenceName() : boolean
Returns true if the attribute has a sequence name for the generated value |
.hasGeneratedValueStrategy(String strategyName) : boolean
Returns TRUE if the attribute has a generated value strategy equal to the given name |
.hasGeneratedValueTablePkValue() : boolean
Returns true if the attribute has a primary key that identifies the generated value in the table |
.hasInitialValue() : boolean
Returns TRUE if there's an initial value for the attribute (not void) |
.hasInputType() : boolean
Returns TRUE if there's an 'input type' defined for the attribute (not void) |
.hasLabel() : boolean
Returns TRUE if there's an 'label' defined for the attribute (not void) |
.hasTag(String tagName) : boolean
Returns TRUE if the attribute has a tag with the given name |
.ini : String
Returns the initialization value for the current language |
.initialValue : String
Returns the initial value as is |
.inputType : String
Returns the 'input type' defined for the attribute |
.insertable : String
Returns the 'insertable' flag value as string |
.insertableIs(boolean value) : boolean
Returns true if 'insertable' flag equals the given value |
.isAutoIncremented() : boolean
Returns TRUE if the attribute is 'auto-incremented' by the database |
.isBinaryType() : boolean
Returns TRUE if the attribute's neutral type is 'binary' |
.isBooleanType() : boolean
Returns TRUE if the attribute's neutral type is'boolean' |
.isByteType() : boolean
Returns TRUE if the attribute's neutral type is 'byte' |
.isDatabaseNotNull() : boolean
Returns TRUE if the attribute must be NOT NULL |
.isDateType() : boolean
Returns TRUE if the attribute's neutral type is 'date' |
.isDecimalType() : boolean
Returns TRUE if the attribute's neutral type is 'decimal' |
.isDoubleType() : boolean
Returns TRUE if the attribute's neutral type is 'double' |
.isFK() : boolean
Returns TRUE if the attribute is used in at least one Foreign Key |
.isFKComposite() : boolean
Returns TRUE if the attribute is used in at least one 'Composite Foreign Key' |
.isFKSimple() : boolean
Returns TRUE if the attribute is used in at least one 'Simple Foreign Key' |
.isFloatType() : boolean
Returns TRUE if the attribute's neutral type is 'float' |
.isGeneratedValue() : boolean
Returns TRUE if the attribute's value is generated when a new entity is inserted in the database |
.isIntegerType() : boolean
Returns TRUE if the attribute's neutral type is 'int' |
.isKeyElement() : boolean
Returns TRUE if the attribute is the Primary Key or a part of the Primary Key in the database |
.isLongText() : boolean
Returns TRUE if the attribute is a 'Long Text' |
.isLongType() : boolean
Returns TRUE if the attribute's neutral type is 'long' |
.isNotBlank() : boolean
Returns TRUE if the attribute has a 'Not Blank' validation rule |
.isNotEmpty() : boolean
Returns TRUE if the attribute has a 'Not Empty' validation rule |
.isNotNull() : boolean
Returns TRUE if the attribute has a 'Not Null' validation rule |
.isNumberType() : boolean
Returns TRUE if the attribute's neutral type is a number type |
.isPrimitiveType() : boolean
Returns TRUE if the attribute's language type is a primitive type |
.isShortType() : boolean
Returns TRUE if the attribute's neutral type is 'short' |
.isStringType() : boolean
Returns TRUE if the attribute's neutral type is 'string' |
.isTemporalType() : boolean
Returns TRUE if the attribute's neutral type is a temporal type |
.isTimeType() : boolean
Returns TRUE if the attribute's neutral type is 'time' |
.isTimestampType() : boolean
Returns TRUE if the attribute's neutral type is 'timestamp' |
.isTransient() : boolean
Returns TRUE if the attribute is marked as 'transient' |
.isUnique() : boolean
Returns TRUE if the attribute is 'unique' |
.label : String
Returns the label for the attribute |
.maxLength : String
Returns the maximum length for the attribute |
.maxValue : String
Returns the maximum value for the attribute |
.minLength : String
Returns the minimum length for the attribute |
.minValue : String
Returns the minimum value for the attribute |
.name : String
Returns the name of the attribute |
.neutralType : String
Returns the 'neutral type', that is to say the type as defined in the model |
.pattern : String
Returns the Reg Exp pattern defined for the attribute |
.referencedEntity : EntityInContext
Returns the entity referenced by this attribute (if any) |
.referencedEntityName : String
Returns the name (class name) of the entity referenced by this attribute (if any) |
.setter : String
Returns the setter for the attribute |
.simpleType : String
Returns the simple type name |
.size : String
Returns the attribute size if any. |
.sizeAsDecimal : BigDecimal
Returns the attribute size as decimal value (BigDecimal) |
.sqlColumnConstraints : String
Returns the SQL column constraints for the attribute |
.sqlColumnName : String
Returns the SQL database column name for the attribute |
.sqlColumnType : String
Returns the SQL database column type for the attribute |
.tagValue(String tagName) : String
Returns the value held by the given tag name |
.tagValue(String tagName, String defaultValue) : String
Returns the value held by the given tag name |
.tagValueAsBoolean(String tagName, boolean defaultValue) : boolean
Returns the boolean value held by the given tag name |
.tagValueAsInt(String tagName, int defaultValue) : int
Returns the integer value held by the given tag name |
.type : String
Returns the target language type for the attribute |
.updatable : String
Returns the 'updatable' flag value as string |
.updatableIs(boolean value) : boolean
Returns true if 'updatable' flag equals the given value |
.wrapperType : String
Returns the wrapper type corresponding to the attribute's primitive type |