|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.ooql.sdk.OBBase com.oberon.ooql.sdk.AdminBase com.oberon.ooql.sdk.ObjectGroup
public class ObjectGroup
Object Group: represents a User facility to collect ObjectObj
isntances for generic purpose
Field Summary | |
---|---|
static java.lang.String |
RECENT_OG_NAME
The ObjectGroup Name for user recent opened objects |
Fields inherited from class com.oberon.ooql.sdk.AdminBase |
---|
bsOptions, HIDDEN_OPTION |
Constructor Summary | |
---|---|
ObjectGroup()
|
|
ObjectGroup(java.lang.String name,
java.lang.String userName)
Define a new ObjectGroup associated to a specific User |
Method Summary | |
---|---|
void |
addFromGroup(java.lang.String objectgroup,
java.lang.String userName)
Add ObjectObj instances to this ObjectGroup belonging to another ObjectGroup |
void |
addFromQuery(Query query)
Add ObjectObj instances to this ObjectGroup as result of query execution |
void |
addObject(java.lang.String objectID)
Add a single ObjectObj to this ObjectGroup |
void |
addObject(java.lang.String objectClass,
java.lang.String objectName,
java.lang.String objectRevision)
Add a single ObjectObj to this ObjectGroup |
java.lang.String |
compareUpdate(ObjectGroup refObjectGroup,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
Return/apply the OOQL command to update this ObjectGroup object and let it become equals to another reference object. |
void |
create(boolean overwrite,
Framework framework)
Create a new ObjectGroup object on the database |
void |
create(Framework framework)
Create a new ObjectGroup object on the database |
void |
destroy(Framework framework)
Remove the ObjectGroup object from the database |
void |
fromXML(org.jdom.Element rootElement)
Load the ObjectGroup object properties from XML element tree |
void |
fromXML(org.jdom.Element rootElement,
boolean getObjects)
Load the ObjectGroup object properties from XML element tree |
java.lang.String |
getCreateCommand(boolean force)
Return the OOQL command to create this ObjectGroup with the settled properties |
java.lang.String |
getCreateCommand(boolean force,
boolean overwrite)
Return the OOQL command to create this ObjectGroup with the settled properties |
java.util.Vector<java.lang.Object> |
getObjects(Framework framework)
Return the ObjectObj instances grouped by this ObjectGroup |
java.lang.String |
getProperty(java.lang.String propertyName,
java.util.Vector<java.lang.Object> filterArgs,
java.lang.String token,
Framework framework)
Get a property for this ObjectGroup object by its OOQL identifier |
java.lang.String |
getSaveCommand(boolean force)
Return the OOQL command to update this ObjectGroup object with the modified properties. |
java.util.Vector<?> |
getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Return a Vector of administrative object names extracted by using an OOQL selector |
java.lang.String |
getUser()
Get the User associated to this ObjectGroup |
int |
getUserId()
Get the internal id of User associated to this ObjectGroup |
org.jdom.Element |
getXMLObjectList(Framework framework)
Return the Object List as XML element tree |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the ObjectGroup object: connect the memory instance with the database instance |
static ObjectGroup |
open(java.lang.String name,
java.lang.String userName,
Framework framework)
Open a ObjectGroup for a given user and read its properties from the database |
static ObjectGroup |
open(java.lang.String name,
java.lang.String userName,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open a ObjectGroup for a given user and read its properties from the database |
void |
removeObject(java.lang.String objectID)
Remove a single ObjectObj from this ObjectGroup |
void |
removeObject(java.lang.String objectClass,
java.lang.String objectName,
java.lang.String objectRevision)
Remove a single ObjectObj from this ObjectGroup |
void |
setUser(java.lang.String userName)
Set the User associated to this ObjectGroup |
void |
setUserId(int userID)
Set the internal id of User associated to this ObjectGroup |
java.lang.String |
toString()
Return the ObjectGroup object basic properties as a single String |
java.lang.String |
toString(Framework framework)
Return the ObjectGroup object extended properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the ObjectGroup object properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the ObjectGroup object properties as XML element tree |
void |
unlink(Framework framework)
Close the object: disconnect the memory instance from the database instance |
void |
updateObjects(java.util.Vector<java.lang.Object> objects)
Update the objects on the basis of a given list |
void |
write(Framework framework)
Update the ObjectGroup object to the database |
Methods inherited from class com.oberon.ooql.sdk.OBBase |
---|
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RECENT_OG_NAME
Constructor Detail |
---|
public ObjectGroup()
public ObjectGroup(java.lang.String name, java.lang.String userName) throws OberonException
name
- the Group nameuserName
- the User
name
OberonException
- if the name contains invalid charactersMethod Detail |
---|
public static ObjectGroup open(java.lang.String name, java.lang.String userName, Framework framework) throws OberonException
name
- the ObjectGroup nameuserName
- the User
nameframework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void link(Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
link
in class AdminBase
framework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic static ObjectGroup open(java.lang.String name, java.lang.String userName, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
name
- the ObjectGroup nameuserName
- the User
nameframework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic void create(Framework framework) throws OberonException
create
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void create(boolean overwrite, Framework framework) throws OberonException
overwrite
- if true overwrite the group when it already existsframework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void write(Framework framework) throws OberonException
write
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void unlink(Framework framework) throws OberonException
unlink
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void destroy(Framework framework) throws OberonException
destroy
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void setUser(java.lang.String userName)
User
associated to this ObjectGroup
public java.lang.String getUser()
User
associated to this ObjectGroup
public void setUserId(int userID)
User
associated to this ObjectGroup
public int getUserId()
User
associated to this ObjectGroup
public void addFromQuery(Query query)
ObjectObj
instances to this ObjectGroup as result of query execution
query
- the Query
namepublic void addFromGroup(java.lang.String objectgroup, java.lang.String userName) throws OberonException
ObjectObj
instances to this ObjectGroup belonging to another ObjectGroup
objectgroup
- the reference ObjectGroup nameuserName
- the reference ObjectGroup User
name
OberonException
public void addObject(java.lang.String objectID)
ObjectObj
to this ObjectGroup
objectID
- the ObjectObj IDpublic void addObject(java.lang.String objectClass, java.lang.String objectName, java.lang.String objectRevision)
ObjectObj
to this ObjectGroup
objectClass
- the ObjectObj's Class
nameobjectName
- the ObjectObj's nameobjectRevision
- the ObjectObj's revisionpublic void removeObject(java.lang.String objectID)
ObjectObj
from this ObjectGroup
objectID
- the ObjectObj IDpublic void removeObject(java.lang.String objectClass, java.lang.String objectName, java.lang.String objectRevision)
ObjectObj
from this ObjectGroup
objectClass
- the ObjectObj's Class
nameobjectName
- the ObjectObj's nameobjectRevision
- the ObjectObj's revisionpublic void updateObjects(java.util.Vector<java.lang.Object> objects)
objects
- list of ObjectObj
's ids or array[Class,Name,Revision]public java.util.Vector<java.lang.Object> getObjects(Framework framework) throws OberonException
ObjectObj
instances grouped by this ObjectGroup
OberonException
public java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
getProperty
in class OBBase
propertyName
- OOQL property identifier/namefilterArgs
- extra arguments used to compute propertiestoken
- separator token for complex propertiesframework
- the current framework
public java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
getTargetNames
in class OBBase
composedName
- OOQL property identifier/name (example: object .. )filterArgs
- extra arguments used to compute propertiesframework
- the current framework
public java.lang.String toString()
toString
in class AdminBase
public java.lang.String toString(Framework framework)
toString
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element getXMLObjectList(Framework framework)
public org.jdom.Element toXML(Framework framework)
toXML
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
toXML
in class AdminBase
fullDump
- true to include detailed informationframework
- the current frameworkgetImage
- true to include "imagedata" element with the base64 encoded image datapublic void fromXML(org.jdom.Element rootElement)
fromXML
in class AdminBase
public void fromXML(org.jdom.Element rootElement, boolean getObjects)
getObjects
- if true export also the ObjectObj instance listpublic java.lang.String getCreateCommand(boolean force)
getCreateCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String getCreateCommand(boolean force, boolean overwrite)
public java.lang.String getSaveCommand(boolean force)
getSaveCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String compareUpdate(ObjectGroup refObjectGroup, boolean checkImage, boolean overwrite, boolean force, Framework framework) throws OberonException
refObjectGroup
- the reference ObjectGroup objectcheckImage
- if true compare also the image iconoverwrite
- if true update the database object instanceforce
- if true ignores optional propertiesframework
- the current framework
OberonException
fromXML(Element)
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |