LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.data
Interface LyClass

All Known Implementing Classes:
LyClassInfo, LyJavaClass, LyPeerClass, LyTableClass, LyUnionClass, LyXmlClass

public interface LyClass

This interface represents the description of physical classes : classes from which datas are obtained to display logical objects presented to the end-user using Leonardi.

The enclosed methods represent the level of services requiered from these physical classes to be able to interface various types of datas.

Different kinds of methods are specified :

See Also:
LyField, LyPeerClass, LyClassInfo, LyDataSource

Field Summary
static java.lang.String __VERSION
          File version
 
Method Summary
 LyValueSet copy(java.lang.Object object1, java.lang.Object object2)
          Copies all field values of an instance of this class on another instance.
 LyDataSource getDataSource()
          Gets the data source that manages all instances of this class.
 LyField getField(java.lang.String id)
          Retrieves a field on this class by its identifier.
 java.util.Vector<? extends LyField> getFields()
          Gets the list of fields of this class.
 java.lang.String getId()
          Gets identifier of the class.
 java.util.Vector<? extends LyField> getIdFields()
          Gets the list of fields that identifies instances of 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.
 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.
 java.lang.Object newInstance()
          Creates a new instance of this class.
 void rehash(java.lang.Object object)
          Recompute the object id of the specified object.
 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.
 

Field Detail

__VERSION

static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Method Detail

getId

java.lang.String getId()
Gets identifier of the class.

Returns:
Identifier of the class.

getName

java.lang.String getName()
Gets name of the class. The name of the class is the name in the information system. By default, if no name is specified, this method returns the id.

Returns:
Name of the class.

getObjectClass

java.lang.Class<?> getObjectClass()
Gets the physical representation of the instances : java class that really holds instances of this class.

Returns:
Java class of the "objects" of this class.

getDataSource

LyDataSource getDataSource()
Gets the data source that manages all instances of this class.

Returns:
Data source that manages the instances of this class.

getIdFields

java.util.Vector<? extends LyField> getIdFields()
Gets the list of fields that identifies instances of this class.

Returns:
List of fields from which an identifier can be calculated.

getFields

java.util.Vector<? extends LyField> getFields()
Gets the list of fields of this class.

Returns:
List of all fields of this class.

getField

LyField getField(java.lang.String id)
Retrieves a field on this class by its identifier.

Parameters:
id - Identifier of the searched field.
Returns:
The field of this class which has the specified identifier, null if no field is found.

getObjectId

LyObjectId getObjectId(java.lang.Object object)
Gets identifier for an instance of this class.

Parameters:
object - Instance of this class.
Returns:
Identifier of the given object.

getValue

java.lang.Object getValue(java.lang.Object object,
                          LyField field)
Gets the value corresponding to the given field for an instance of this class.

Parameters:
object - Instance of this class.
field - Field for which a value is requested.
Returns:
Value of the given field on the specified instance.

setValue

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.

Parameters:
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.

copy

LyValueSet copy(java.lang.Object object1,
                java.lang.Object object2)
Copies all field values of an instance of this class on another instance.

Parameters:
object1 - Object on which values are copied.
object2 - Object from which values are get.
Returns:
Field values that are copied from object2 to object1.

getValues

LyValueSet getValues(java.lang.Object object)
Gets all field values from an instance of this class.

Parameters:
object - Instance of this class.
Returns:
All the field values of the given instance.

newInstance

java.lang.Object newInstance()
                             throws java.lang.InstantiationException,
                                    java.lang.IllegalAccessException
Creates a new instance of this class.

Returns:
New instance of this class.
Throws:
java.lang.IllegalAccessException - If the class or initializer is not accessible.
java.lang.InstantiationException - If an application tries to instantiate an abstract class or an interface, or if the instantiation fails for some other reason.

rehash

void rehash(java.lang.Object object)
Recompute the object id of the specified object.

Parameters:
object - object to rehash

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com