|
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.AutoNumber
public class AutoNumber
AutoNumber Admin Object: generates progressive names with a given format.
Field Summary | |
---|---|
static java.lang.String |
separators
Set of separator characters for the AutoNumber format |
static java.lang.String |
symbolTypes
Set of symbolic incremental digits for the AutoNumber format. |
Fields inherited from class com.oberon.ooql.sdk.AdminBase |
---|
bsOptions, HIDDEN_OPTION |
Constructor Summary | |
---|---|
AutoNumber()
|
|
AutoNumber(java.lang.String name)
|
Method Summary | |
---|---|
static java.lang.String |
checkSequence(java.lang.String sequence,
java.lang.String value)
Check if a value is valid for the given sequence |
static java.lang.String |
checkSequence(java.lang.String sequence,
java.lang.String value,
boolean reset)
Check if a value is valid for the given sequence |
java.lang.String |
compareUpdate(AutoNumber refAutoNumber,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
Return/apply the OOQL command to update this AutoNumber object and let it become equals to another reference object. |
void |
create(boolean force,
Framework framework)
Create a new AutoNumber object on the database |
void |
create(Framework framework)
Create a new AutoNumber object on the database |
void |
destroy(Framework framework)
Remove the AutoNumber object from the database |
void |
fromXML(org.jdom.Element rootElement)
Load the AutoNumber object properties from XML element tree |
java.lang.String |
getCreateCommand(boolean force)
Return the OOQL command to create this AutoNumber object with the settled properties |
java.lang.String |
getFormat()
Get the AutoNumber global format |
java.lang.String |
getLifecycle()
Get the associated Lifecycle |
java.lang.String |
getNextValue()
Get the AutoNumber next counter value |
static java.lang.String |
getNextValue(java.lang.String sequence,
java.lang.String currentValue)
Return the next value for the given sequence |
static java.lang.String |
getNextValue(java.lang.String sequence,
java.lang.String currentValue,
int increment)
Return the incremented value for the given sequence |
java.lang.String |
getObjectSpace()
Get the associated ObjectSpace |
java.lang.String |
getProgram()
Get the sequence generator method |
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 AutoNumber object by its OOQL identifier |
java.lang.String |
getSaveCommand(boolean force)
Return the OOQL command to update this AutoNumber object with the modified properties. |
java.lang.String |
getSequence()
Get the AutoNumber sequence format |
java.lang.String |
getTargetClass()
Get the associated Class |
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 |
void |
increment(int increment,
Framework framework)
Increment the current AutoNumber value |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the AutoNumber object: connect the memory instance with the database instance |
static AutoNumber |
open(java.lang.String name,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open an administrative object and read properties from the database or retrieve them from memory |
static java.lang.String |
resetValue(java.lang.String sequence)
Return the first value for the given sequence |
void |
setFormat(java.lang.String format)
Set the AutoNumber global format |
void |
setLifecycle(java.lang.String lifecycleName)
Set an associated Lifecycle; it's used to auto-generate new ObjectObj instances with this Lifecycle |
void |
setNextValue(java.lang.String nextValue)
Fix the AutoNumber next counter value |
void |
setObjectSpace(java.lang.String objectSpaceName)
Set an associated ObjectSpace; it's used to auto-generate new ObjectObj instances inside this ObjectSpace |
void |
setProgram(java.lang.String programName)
Set a method to generate the counter sequence values instead of using the sequence rule |
void |
setSequence(java.lang.String sequence)
Set the AutoNumber counter sequence format |
void |
setTargetClass(java.lang.String className)
Set an associated Class; it's used to auto-generate new ObjectObj instances of this class with progressive names |
java.lang.String |
toString()
Return the AutoNumber object basic properties as a single String |
java.lang.String |
toString(Framework framework)
Return the AutoNumber object extended properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the AutoNumber object properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the AutoNumber object properties as XML element tree |
void |
unlink(Framework framework)
Close the object: disconnect the memory instance from the database instance |
void |
write(boolean force,
Framework framework)
Update the AutoNumber object to the database. |
void |
write(Framework framework)
Update the AutoNumber 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 separators
public static final java.lang.String symbolTypes
Constructor Detail |
---|
public AutoNumber()
public AutoNumber(java.lang.String name) throws OberonException
name
- the name of the administrative object
OberonException
- if the name contains invalid charactersMethod Detail |
---|
public static AutoNumber open(java.lang.String name, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
name
- the object nameframework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
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 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 force, Framework framework) throws OberonException
force
- if true ignores optional featuresframework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void increment(int increment, Framework framework) throws OberonException
increment
- the increment valueframework
- 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 write(boolean force, Framework framework) throws OberonException
force
- if true ignores optional featuresframework
- 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 setSequence(java.lang.String sequence) throws OberonException
sequence
- the sequence format: can contain only separators
or symbolTypes
characters
OberonException
- when the input format includes not allowed characterspublic java.lang.String getSequence()
public void setFormat(java.lang.String format) throws OberonException
format
- the global number format: must contain the <COUNTER> tag inside to specify the counter position
OberonException
- when the input format doesn't include the counter tagpublic java.lang.String getFormat()
public void setNextValue(java.lang.String nextValue)
nextValue
- the value; must be compatible with the sequence formatpublic java.lang.String getNextValue()
public void setTargetClass(java.lang.String className)
ObjectObj
instances of this class with progressive names
className
- the Class
namepublic java.lang.String getTargetClass()
Class
namepublic void setLifecycle(java.lang.String lifecycleName)
ObjectObj
instances with this Lifecycle
lifecycleName
- the Lifecycle
namepublic java.lang.String getLifecycle()
Lifecycle
namepublic void setObjectSpace(java.lang.String objectSpaceName)
ObjectObj
instances inside this ObjectSpace
objectSpaceName
- the ObjectSpace
namepublic java.lang.String getObjectSpace()
ObjectSpace
namepublic void setProgram(java.lang.String programName)
programName
- the Program
namepublic java.lang.String getProgram()
Program
namepublic 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/name (example: sequence , format ...)filterArgs
- 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: class , lifecycle .. )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 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
getImage
- true to include "imagedata" element with the base64 encoded image datafullDump
- true to include detailed informationframework
- the current frameworkpublic void fromXML(org.jdom.Element rootElement)
fromXML
in class AdminBase
public java.lang.String getCreateCommand(boolean force)
getCreateCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String getSaveCommand(boolean force)
getSaveCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String compareUpdate(AutoNumber refAutoNumber, boolean checkImage, boolean overwrite, boolean force, Framework framework) throws OberonException
refAutoNumber
- the reference AutoNumber 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)
public static java.lang.String checkSequence(java.lang.String sequence, java.lang.String value) throws OberonException
sequence
- the counter sequence formatvalue
- the value to check
OberonException
public static java.lang.String checkSequence(java.lang.String sequence, java.lang.String value, boolean reset) throws OberonException
sequence
- the counter sequence formatvalue
- the value to checkreset
- if true, return the sequence first value instead of raise the exception
OberonException
- if the value is not validpublic static java.lang.String getNextValue(java.lang.String sequence, java.lang.String currentValue) throws OberonException
sequence
- the counter sequence formatcurrentValue
- the current value
OberonException
- if the current value is not validpublic static java.lang.String getNextValue(java.lang.String sequence, java.lang.String currentValue, int increment) throws OberonException
sequence
- the counter sequence formatcurrentValue
- the current valueincrement
- the increment respect current value
OberonException
- if the current value is not validpublic static java.lang.String resetValue(java.lang.String sequence) throws OberonException
sequence
- the counter sequence format
OberonException
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |