public abstract class Attribute extends Object
Modifier | Constructor and Description |
---|---|
protected |
Attribute() |
Modifier and Type | Method and Description |
---|---|
protected abstract Object |
get(EntityInstance inst) |
abstract String |
getName()
Gets the name of the attribute.
|
EntityDomain |
getOwner()
Get the domain that defines the attribute.
|
protected abstract Class |
getOwnerClass() |
Object |
getValue(EntityInstance inst)
Retrieves an attribute value in a late-bound fashion.
|
boolean |
isAggregate()
Determines if the type of the attribute is an Aggregate type.
|
boolean |
isBoolean()
Determines if the type of the attribute is a boolean
|
boolean |
isEntity()
Determines if the type of the attribute is an Entity type.
|
boolean |
isInteger()
Determines if the type of the attribute is an INTEGER type.
|
boolean |
isLogical()
Determines if the type of the attribute is a boolean
|
boolean |
isReal()
Determines if the type of the attribute is a REAL type.
|
boolean |
isSelect()
Determines if the type of the attribute is a Select type.
|
boolean |
isString()
Determines if the type of the attribute is a STRING type.
|
protected abstract void |
set(EntityInstance inst,
Object val) |
void |
setValue(EntityInstance inst,
Object val)
Sets an attribute value of an entity instance in a late-bound fashon
The preferred, early-bound, operation for settting attribute values
is to call the
setXXX) method on subtype of the
EntityInstace object. |
abstract Class |
slotClass()
Reserved for EXPRESS generated classes
|
Domain |
slotDomain()
Get the domain for the type of the attribute.
|
public abstract Class slotClass()
public Domain slotDomain()
protected abstract Object get(EntityInstance inst)
protected abstract void set(EntityInstance inst, Object val)
protected abstract Class getOwnerClass()
public EntityDomain getOwner()
public boolean isBoolean()
true
if the attribute value is a boolean.public boolean isLogical()
true
if the attribute value is a boolean.public boolean isEntity()
true
if the attribute value is an entity.public boolean isSelect()
true
if the attribute value is a Select type.public boolean isAggregate()
true
if the attribute value is an Aggregate type.public boolean isReal()
true
if the attribute value is an REAL type.public boolean isInteger()
true
if the attribute value is an Aggregate type.public boolean isString()
true
if the attribute value is an Aggregate type.public void setValue(EntityInstance inst, Object val)
setXXX)
method on subtype of the
EntityInstace object.inst
- The instance getting updated.val
- The value to set the attribute to. For integer and double,
the value must be wrapped up in a java.lang.Integer or
java.lang.Double. For all other types, the value is passed in
directly.TypeException
- The type of val cannot be assigned to
the type of the attribute.public abstract String getName()
public Object getValue(EntityInstance inst)
getXXX)
method on subtype of the
EntityInstace object.inst
- The EntityInstance to get the attribute from.double
,
or int
, it is wrapped in a
java.lang.Double
or
java.lang.Integer
, unless the value is unset.
Other types are returned literally
If the attribute is unset, null
is returned.TypeException
- if inst
is not an instance of the entity
that owns this attribute.