|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.uql.erm.XEntity
public class XEntity
An XEntity represents a business logic object in a data model. Entities contain a collection of attributes which describe that object.
| Field Summary | |
|---|---|
static String |
DESCRIPTION
Property name of the description of an entity. |
static String |
LOCATION
Property name of the location of an entity. |
static String |
NAME
Property name of the name of an entity. |
| Constructor Summary | |
|---|---|
XEntity()
Creates a new instance of XEntity. |
|
XEntity(String name)
Creates a new instance of XEntity with the specified name. |
|
XEntity(XEntity base)
Creates a new instance of XEntity with the specified name. |
|
| Method Summary | |
|---|---|
void |
addAttribute(int idx,
XAttribute attribute)
Add the attribute at the specified position. |
void |
addAttribute(XAttribute attribute)
Adds the specified attribute to this entity. |
void |
addPropertyChangeListener(PropertyChangeListener l)
Add a listener that is notified when a property of this entity has been changed. |
Object |
clone()
Creates and returns a copy of this entity object. |
int |
compareTo(Object obj)
Compare the entities by name. |
boolean |
containsAttribute(String name)
Check if contains an attribute. |
boolean |
containsColumn(String table,
String column)
Determines if this entity contains an attribute that is mapped to the specified column. |
boolean |
equals(Object obj)
|
XAttribute |
getAttribute(String name)
Gets the attribute of this entity with the specified name. |
XAttribute |
getAttributeAt(int idx)
Get the attribute at the specified index. |
int |
getAttributeCount()
Get the number of attributes contained in this entity. |
int |
getAttributeIndex(String name)
Get the position of the attribute within the entity. |
Enumeration |
getAttributes()
Gets all attributes contained in this entity. |
XEntity |
getBaseEntity()
Get base entity. |
String |
getDescription()
Gets a description of this entity. |
Point |
getLocation()
Gets the location at which this entity should be rendered in the data model designer. |
String |
getName()
Gets the name of this entity. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isAttributeVisible(String name)
Check the specified attribute is visible or not. |
boolean |
isBaseAttribute(String name)
Check if the specified attribute is from base entity. |
boolean |
isBaseEntity()
Check if is base entity. |
boolean |
isMappedToColumn(String table,
String column)
Determine if any of the attributes in this entity are mapped to the specified column. |
boolean |
isMappedToTable(String table)
Determine if any of the attributes in this entity are mapped to the specified table. |
boolean |
isVisible()
Check this entity is visible or not. |
boolean |
moveAttribute(String name,
boolean up)
move up or down the attribute with the specified name. |
void |
parseXML(Element tag)
Reads in an entity definition from its XML representation. |
void |
removeAllPropertyChangeListeners()
Removes all registered property change listeners from the notification list. |
void |
removeAttribute(String name)
Removes the attribute with the specified name from this entity. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a property change listener from the notification list. |
void |
setAttributeVisible(String name,
boolean visible)
Set the specified attribute is visible or not. |
void |
setBaseEntity(XEntity base)
Set base entity. |
void |
setDescription(String description)
Sets the description for this entity. |
void |
setLocation(Point location)
Sets the location at which this entity should be rendered in the data model designer. |
void |
setName(String name)
Sets the name of this entity. |
void |
setRuntime(boolean runtime)
Set is runtime mode or not. |
void |
setVisible(boolean visible)
Set this entity is visible or not. |
void |
sortAttributes()
Sorts the attributes by their names in alphabetical order. |
String |
toString()
Gets a textual representation of this entity. |
void |
updateAttribute(String oname,
XAttribute attribute)
Update an attribute in this entity. |
void |
validate()
validate. |
protected void |
writeXML(PrintWriter writer)
Writes the XML element representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME
public static final String DESCRIPTION
public static final String LOCATION
| Constructor Detail |
|---|
public XEntity()
public XEntity(String name)
name - a human readable name for the entity. The name should allow
a user to infer the entity's usage.public XEntity(XEntity base)
base - the base entity.| Method Detail |
|---|
public void setName(String name)
name - the name of this entity.public String getName()
public void setDescription(String description)
description - a description of this entity.public String getDescription()
public void addAttribute(XAttribute attribute)
attribute - the attribute object to add.
public void addAttribute(int idx,
XAttribute attribute)
public boolean isBaseAttribute(String name)
public void updateAttribute(String oname,
XAttribute attribute)
oname - the original name of the attribute.attribute - the attribute that has been modified.public void removeAttribute(String name)
name - the name of the attribute to remove.public XAttribute getAttribute(String name)
name - the name of the attribute to find.
null if this entity does not
contain an attribute with the specified name.public int getAttributeIndex(String name)
public Enumeration getAttributes()
public boolean containsAttribute(String name)
name - the specified attribute name.
public int getAttributeCount()
public XAttribute getAttributeAt(int idx)
idx - the index of the attribute.
public boolean moveAttribute(String name,
boolean up)
name - the name of the attribute to move.up - the direction true: up.public void sortAttributes()
public boolean containsColumn(String table,
String column)
table - the name of the table.column - the name of the column.public boolean isBaseEntity()
public Point getLocation()
public void setLocation(Point location)
location - the upper-left corner of this entity.protected void writeXML(PrintWriter writer)
writer - the output stream to which to write the XML data.
public void parseXML(Element tag)
throws Exception
tag - the XML Element for this object.
Exceptionpublic String toString()
getName() method.
toString in class ObjectXEntity: entity name.public Object clone()
clone in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int compareTo(Object obj)
compareTo in interface Comparablepublic boolean isMappedToTable(String table)
table - the name of the table.
true if this entity contains a mapping to the
specified table; false otherwise.
public boolean isMappedToColumn(String table,
String column)
table - the name of the table.column - the name of the column.
true if this entity contains a mapping to the
specified column; false otherwise.public void addPropertyChangeListener(PropertyChangeListener l)
l - the listener to add.public void removePropertyChangeListener(PropertyChangeListener l)
l - the listener to remove.public void removeAllPropertyChangeListeners()
public void setBaseEntity(XEntity base)
public XEntity getBaseEntity()
public void validate()
public void setRuntime(boolean runtime)
public boolean isAttributeVisible(String name)
name - the name of the specified attribute.
public void setAttributeVisible(String name,
boolean visible)
name - the name of the specified attribute.public boolean isVisible()
public void setVisible(boolean visible)
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||