|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.model.IlpAbstractClass
ilog.cpl.model.IlpDefaultClass
public class IlpDefaultClass
Default business class implementation.
Instances of IlpClass represent classes of the model.
They provide access to the class hierarchy, and
to the class attributes.
| Constructor Summary | |
|---|---|
IlpDefaultClass(String name)
Creates an IlpClass with the given name. |
|
IlpDefaultClass(String name,
IlpClass superClass,
List subClasses)
Creates an IlpClass instance with all the needed
configuration. |
|
| Method Summary | |
|---|---|
void |
addAttribute(IlpAttribute attribute)
Adds an attribute to the class. |
void |
addAttributeGroup(IlpAttributeGroup model)
Adds the given model to be used by this one. |
void |
addAttributeGroupListener(AttributeGroupListener l)
Adds a listener to model changes. |
void |
fireEvent(AttributeGroupEvent ev)
Fires an event to the listeners. |
IlpAttribute |
getAttribute(String name)
Returns an instance attribute of the class. |
Collection |
getAttributeGroups()
Returns the list of all attribute groups being used by this one. |
Collection |
getAttributes()
Returns the instance attributes of the class as a Collection. |
Collection |
getDeclaredAttributes()
Returns the instance attributes of the class as a Collection. |
boolean |
hasAttribute(IlpAttribute attr)
Returns whether the given attribute is part of the model. |
IlpObject |
newInstance(IlpClass ilpClass,
Object identifier,
boolean initializeAttributeValues)
Creates an instance of the class. |
IlpObject |
newInstance(Object identifier,
boolean initializeAttributeValues)
Creates an instance of the class. |
void |
removeAttribute(IlpAttribute attribute)
Removes an attribute from the class. |
void |
removeAttributeGroup(IlpAttributeGroup model)
Removes the given model from the list of models. |
void |
removeAttributeGroupListener(AttributeGroupListener l)
Removes the model listener. |
void |
setSuperClass(IlpClass superClass)
Sets the superclass. |
String |
toString()
|
| Methods inherited from class ilog.cpl.model.IlpAbstractClass |
|---|
addSubClass, getName, getSubClasses, getSuperClass, isAssignableFrom, isSubClassOf, removeSubClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ilog.cpl.model.IlpMutableClass |
|---|
addSubClass, removeSubClass |
| Methods inherited from interface ilog.cpl.model.IlpClass |
|---|
getSubClasses, getSuperClass, isAssignableFrom, isSubClassOf |
| Methods inherited from interface ilog.cpl.model.IlpAttributeGroup |
|---|
getName |
| Methods inherited from interface ilog.cpl.model.IlpAttributeGroup |
|---|
getName |
| Constructor Detail |
|---|
public IlpDefaultClass(String name)
IlpClass with the given name.
name - IlpClass name identifier.
public IlpDefaultClass(String name,
IlpClass superClass,
List subClasses)
IlpClass instance with all the needed
configuration.
name - IlpClass name identifier.superClass - List of all the IlpClass instances
that are superclasses of this one.subClasses - List of all the classes that inherit from
this one.
.| Method Detail |
|---|
public void setSuperClass(IlpClass superClass)
This method sets the superclass information. It does not
update the corresponding information in the parent class. To do this, use
the method addSubClass.
setSuperClass in interface IlpMutableClasssuperClass - Super classIlpAbstractClass.addSubClass(ilog.cpl.model.IlpClass)public void addAttributeGroup(IlpAttributeGroup model)
addAttributeGroup in interface IlpMutableClasspublic void removeAttributeGroup(IlpAttributeGroup model)
removeAttributeGroup in interface IlpMutableClasspublic Collection getAttributeGroups()
addAttributeGroup(ilog.cpl.model.IlpAttributeGroup)public void addAttribute(IlpAttribute attribute)
addAttribute in interface IlpMutableAttributeGroupattribute - The attribute to be added.IlpAttribute.setAttributeGroup(ilog.cpl.model.IlpAttributeGroup)public void removeAttribute(IlpAttribute attribute)
removeAttribute in interface IlpMutableAttributeGroupattribute - The attribute to be removed.IlpAttribute.setAttributeGroup(ilog.cpl.model.IlpAttributeGroup)
public IlpObject newInstance(Object identifier,
boolean initializeAttributeValues)
The new instance is created with the given identifier. If the
argument initializeAttributeValues is set, the new instance
is initialized with the default attribute values. Default attribute
values are set in the attribute itself and are retrieved using
IlpAttribute.getDefaultValue().
newInstance in interface IlpClassidentifier - Object identifier.initializeAttributeValues -
IlpObject interface. This default implementation returns
an IlpDefaultObject instance.IlpObject,
IlpAttribute.getDefaultValue()
public IlpObject newInstance(IlpClass ilpClass,
Object identifier,
boolean initializeAttributeValues)
The new instance is created with the given identifier. If the
argument initializeAttributeValues is set, the new instance
is initialized with the default attribute values. Default attribute
values are set in the attribute itself and are retrieved using
IlpAttribute.getDefaultValue().
Note: This method is supposed to be called by a subclass, the subclass passing itself as the first parameter.
newInstance in interface IlpClassilpClass - Business class.identifier - Object identifier.initializeAttributeValues -
IlpObject interface. This default implementation returns
an IlpDefaultObject instance.IlpObject,
IlpAttribute.getDefaultValue()public Collection getAttributes()
Collection.
This implementation returns a collection where the attributes are in the following order:
getAttributes in interface IlpAttributeGroupIlpAttribute instances.public Collection getDeclaredAttributes()
Collection.
This method returns only the attributes declared in this class in their
insertion order.
getDeclaredAttributes in interface IlpAttributeGroupIlpAttribute instances.public IlpAttribute getAttribute(String name)
getAttribute in interface IlpAttributeGroupname - The name of the instance attribute to be retrieved.
null
if there is no matching attribute.public boolean hasAttribute(IlpAttribute attr)
hasAttribute in interface IlpAttributeGrouppublic void addAttributeGroupListener(AttributeGroupListener l)
addAttributeGroupListener in interface IlpAttributeGrouppublic void removeAttributeGroupListener(AttributeGroupListener l)
removeAttributeGroupListener in interface IlpAttributeGrouppublic void fireEvent(AttributeGroupEvent ev)
fireEvent in interface IlpAttributeGrouppublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||