Other name(s) : $attrib, $field
( documentation for Telosys generator version 3.3.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 |
.databaseSize : String
Returns the database size for the attribute |
.databaseType : String
Returns the database native type for the attribute |
.databaseTypeWithSize : String
Returns the database native type for the attribute with the size if it makes sens |
.dateAfterValue : String
Returns the 'date after' value (for date validation) |
.dateBeforeValue : String
Returns the 'date before' value (for date validation) |
.dateType : int
Returns the type of the date : $const.DATE_ONLY, $const.TIME_ONLY, $const.DATE_AND_TIME |
.defaultValue : String
Returns the default value for the attribute |
.entity : EntityInContext
Returns the entity owning the attribute |
.fkParts : List of 'fkPart' objects
Returns the parts of Foreign Keys for which the attribute is implied. |
.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 |
.generatedValueGenerator : String
Returns the generator for a 'generated value' |
.generatedValueStrategy : String
Returns the strategy for a 'generated value' (or null if none) |
.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 (not null and not void) |
.hasDatabaseDefaultValue() : boolean
Returns TRUE if the attribute has a database default value (not null and not void) |
.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) |
.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) |
.hasSequenceGenerator() : boolean
Returns TRUE if the attribute is a 'generated value' using a 'sequence generator' |
.hasTableGenerator() : boolean
Returns TRUE if the attribute is a 'generated value' using a 'table generator' |
.hasTag(String tagName) : boolean
Returns TRUE if the attribute has a tag with the given name |
.initialValue : String
Returns the initial value for the attribute |
.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 when stored in the database |
.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 a part of a 'Composite Foreign Key' |
.isFKSimple() : boolean
Returns TRUE if the attribute is itself a '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 |
.isSelected() : boolean
Returns TRUE if the attribute is selected (ckeckbox ckecked in the GUI) |
.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' |
.jdbcRecommendedJavaType : String
Returns the recommended Java type for the JDBC type of the attribute |
.jdbcTypeCode : int
Returns the JDBC type of the attribute (the type code) |
.jdbcTypeName : String
Returns the JDBC type name ('CHAR', 'VARCHAR', 'NUMERIC', ... ) |
.label : String
Returns the label for the attribute |
.maxLength : String
Returns the maximum length for the attribute (if any, else returns void) |
.maxValue : String
Returns the maximum value for the attribute (if any, else returns void) |
.minLength : String
Returns the minimum length for the attribute (if any, else returns void) |
.minValue : String
Returns the minimum value for the attribute (if any, else returns void) |
.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 (if any, else returns void) |
.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) |
.sequenceGeneratorAllocationSize : int
Returns the 'sequence allocation size' to be used in the 'sequence generator' definition |
.sequenceGeneratorName : String
Returns the name of the 'sequence generator' |
.sequenceGeneratorSequenceName : String
Returns the 'sequence name' to be used in the 'sequence generator' definition |
.setter : String
Returns the setter for the attribute |
.simpleType : String
Returns the simple type name |
.sqlType : String
Returns the database SQL type corresponding to the attribute |
.tableGeneratorName : String
Returns the name of the 'table generator' |
.tableGeneratorPkColumnName : String
Returns the name of the Primary Key column used in the 'table generator' |
.tableGeneratorPkColumnValue : String
Returns the primary key value in the generator table that distinguishes this set of generated values |
.tableGeneratorTable : String
Returns the name of the table used in the 'table generator' |
.tableGeneratorValueColumnName : String
Returns the name of the column that stores the last value generated by the 'table generator' |
.tagValue(String tagName) : String
Returns the value held by the given tag name |
.type : String
Returns the recommended 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 |