|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.peer.LyPeerClass
public abstract class LyPeerClass
This class offers a default abstract implementation of LyClass interface for physical classes.
Using this class, 3 methods remain abstract :
LyPeerField
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.lang.Object |
VALUE_NOT_LOADED
Used to find unloaded values in the physical layer. |
Constructor Summary | |
---|---|
LyPeerClass()
Constructs a peer class with no parameter. |
|
LyPeerClass(java.lang.String id,
java.lang.Class<?> objectClass)
Constructs a peer class with a given id and an objects class. |
Method Summary | |
---|---|
int |
addField(LyPeerField field)
Adds a peer field in this peer class. |
void |
addIdField(LyPeerField field)
Registers a peer field as an id field on this class. |
LyValueSet |
copy(java.lang.Object object1,
java.lang.Object object2)
Copies all field values of an instance of this class on another instance. |
void |
dump(LyEnvironment environment)
Dump content of this peer class to output of the environment. |
LyDataSource |
getDataSource()
Gets the data source that manages all instances of this class. |
LyPeerField |
getField(int index)
Gets field at the given index. |
LyField |
getField(java.lang.String id)
Retrieves a field on this class by its identifier. |
int |
getFieldCount()
Gets the number of fields of this class. |
java.util.Vector<LyField> |
getFields()
Gets the list of fields of this class. |
java.lang.String |
getId()
Gets identifier of the class. |
java.util.Vector<LyField> |
getIdFields()
Gets the list of id fields of this class. |
int |
getIndex(LyPeerField field)
Gets index of the given peer field in this class. |
java.lang.String |
getName()
Gets name of the class. |
java.lang.Class<?> |
getObjectClass()
Gets the physical representation of the instances : java class that really holds instances of this class. |
LyObjectId |
getObjectId(java.lang.Object object)
Gets identifier for an instance of this class. |
LyObjectId |
getObjectIdNoCache(java.lang.Object object)
Gets identifier for an instance of this class. |
java.lang.Object |
getValue(java.lang.Object object,
LyField field)
Gets the value corresponding to the given field for an instance of this class. |
LyValueSet |
getValues(java.lang.Object object)
Gets all field values from an instance of this class. |
void |
removeField(LyPeerField field)
Removes a peer field in this peer class. |
void |
setDataSource(LyDataSource dataSource)
Sets the data source of this class. |
void |
setId(java.lang.String id)
Sets identifier of the class. |
void |
setName(java.lang.String name)
Sets name of the class. |
void |
setValue(java.lang.Object object,
LyField field,
java.lang.Object value)
Sets the value corresponding to the given field on an instance of this class. |
java.lang.String |
toString()
Returns a display string. |
LyValueSet |
validate(java.lang.Object object,
LyValueSet values)
To validate the new values (already known) and add new extra values. if needed. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface leon.data.LyClass |
---|
newInstance, rehash |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final java.lang.Object VALUE_NOT_LOADED
Constructor Detail |
---|
public LyPeerClass()
public LyPeerClass(java.lang.String id, java.lang.Class<?> objectClass)
id
- Identifier of this class.objectClass
- Java class used for "peer objects".Method Detail |
---|
public LyValueSet validate(java.lang.Object object, LyValueSet values)
object
- Instance of this class.values
- Validated values.
public java.lang.String getId()
getId
in interface LyClass
public java.lang.String getName()
getName
in interface LyClass
public java.lang.Class<?> getObjectClass()
getObjectClass
in interface LyClass
public LyDataSource getDataSource()
getDataSource
in interface LyClass
public java.util.Vector<LyField> getFields()
getFields
in interface LyClass
public LyPeerField getField(int index)
index
- Index of searched field.
public int getFieldCount()
public java.util.Vector<LyField> getIdFields()
getIdFields
in interface LyClass
public void setId(java.lang.String id)
id
- Identifier of the class.
java.lang.IllegalStateException
- If the class has already an id.public void setName(java.lang.String name)
name
- Name of the class.
java.lang.IllegalStateException
- If the class has already a name.public void setDataSource(LyDataSource dataSource)
dataSource
- Data source of the class.
java.lang.IllegalStateException
- If the class has already a data source.public final int getIndex(LyPeerField field)
field
- Peer field for which the index is searched.
public int addField(LyPeerField field)
field
- Peer field added to this class.
java.lang.IllegalArgumentException
- If the given field is null.
java.lang.IllegalStateException
- If the class has already a field with the same id.public void removeField(LyPeerField field)
field
- Peer field removed to this class.
java.lang.IllegalArgumentException
- If the given field is null.public LyField getField(java.lang.String id)
getField
in interface LyClass
id
- Identifier of the searched field.
java.lang.IllegalArgumentException
- If the given id is null.public void addIdField(LyPeerField field)
field
- Peer field to register as id field.public LyObjectId getObjectId(java.lang.Object object)
getObjectId
in interface LyClass
object
- Instance of this class.
getId(java.lang.Object)
,
setId(java.lang.Object, leon.data.LyObjectId)
public LyObjectId getObjectIdNoCache(java.lang.Object object)
object
- Instance of this class.
getId(java.lang.Object)
,
setId(java.lang.Object, leon.data.LyObjectId)
public java.lang.Object getValue(java.lang.Object object, LyField field)
getValue
in interface LyClass
object
- Instance of this class.field
- Field for which a value is requested.
java.lang.IllegalArgumentException
- If object or field is null.public void setValue(java.lang.Object object, LyField field, java.lang.Object value)
setValue
in interface LyClass
object
- Instance of this class on which a value is set.field
- Field for which a value is set.value
- Value set for the given field on the specified instance.
java.lang.IllegalArgumentException
- If object or field is null.
java.lang.IllegalArgumentException
- If the given value is not null but doesn't match the
value class of the field.public LyValueSet getValues(java.lang.Object object)
getValues
in interface LyClass
object
- Instance of this class.
public LyValueSet copy(java.lang.Object object1, java.lang.Object object2)
copy
in interface LyClass
object1
- Object on which values are copied.object2
- Object from which values are get.
public void dump(LyEnvironment environment)
environment
- The environment to dump the class.public java.lang.String toString()
toString
in class java.lang.Object
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |