org.opencrx.kernel.depot1.jdo2
Class Segment

java.lang.Object
  extended by org.oasisopen.jdo2.Identifiable
      extended by org.w3c.jdo2.AbstractObject
          extended by org.openmdx.base.jdo2.Segment
              extended by org.opencrx.kernel.jdo2.Segment
                  extended by org.opencrx.kernel.depot1.jdo2.Segment
All Implemented Interfaces:
Serializable, Detachable, PersistenceCapable, Auditee, Importer, Indexed, SecureObject, XmlExporter, org.openmdx.base.cci2.ContextCapable, org.openmdx.base.cci2.Segment, org.openmdx.compatibility.view1.cci2.ViewCapable

public class Segment
extends Segment
implements Segment

Class Segment

See Also:
Serialized Form

Nested Class Summary
static class Segment.Slice
          Slice object hold the Segment's multivalued attributes
 
Nested classes/interfaces inherited from class org.openmdx.base.jdo2.Segment
org.openmdx.base.jdo2.Segment.Identity
 
Nested classes/interfaces inherited from class org.w3c.jdo2.AbstractObject
org.w3c.jdo2.AbstractObject.EmbeddedList<E>, org.w3c.jdo2.AbstractObject.EmbeddedSet<E>
 
Nested classes/interfaces inherited from interface org.openmdx.base.cci2.Segment
org.openmdx.base.cci2.Segment.Identity
 
Nested classes/interfaces inherited from interface javax.jdo.spi.PersistenceCapable
PersistenceCapable.ObjectIdFieldConsumer, PersistenceCapable.ObjectIdFieldManager, PersistenceCapable.ObjectIdFieldSupplier
 
Field Summary
static List<String> CLASS
          Define the model class org::opencrx::kernel::depot1::Segment
 
Fields inherited from class org.openmdx.base.jdo2.Segment
BASE_CLASS
 
Fields inherited from interface javax.jdo.spi.PersistenceCapable
CHECK_READ, CHECK_WRITE, LOAD_REQUIRED, MEDIATE_READ, MEDIATE_WRITE, READ_OK, READ_WRITE_OK, SERIALIZABLE
 
Constructor Summary
Segment()
           
 
Method Summary
 void addDepotType(boolean idIsPersistent, String id, DepotType depotType)
          Adds the specified element to the set of the values for the reference depotType.
 void addEntity(boolean idIsPersistent, String id, DepotEntity entity)
          Adds the specified element to the set of the values for the reference entity.
 void addEntityRelationship(boolean idIsPersistent, String id, DepotEntityRelationship entityRelationship)
          Adds the specified element to the set of the values for the reference entityRelationship.
 ModifySecureObjectResult addOwningGroup(PrincipalGroup group, short mode)
           
 void addSimpleBooking(boolean idIsPersistent, String id, SimpleBooking simpleBooking)
          Adds the specified element to the set of the values for the reference simpleBooking.
 CheckPermissionsResult checkPermissions(String principalName)
           
 ExportResult exportXml(String attributeFilter, String referenceFilter)
           
 org.openmdx.base.cci2.BasicObject getAccessGrantedByParent()
          Retrieves the value for the reference accessGrantedByParent.
 short getAccessLevelBrowse()
          Retrieves the value for the attribute accessLevelBrowse.
 short getAccessLevelDelete()
          Retrieves the value for the attribute accessLevelDelete.
 short getAccessLevelUpdate()
          Retrieves the value for the attribute accessLevelUpdate.
<T extends AuditEntry>
Collection<T>
getAudit()
          Retrieves a set containing all the elements for the reference audit.
 AuditEntry getAudit(boolean idIsPersistent, String id)
          Retrieves the value for the reference audit for the specified qualifier attribute value.
<T extends SingleBooking>
Collection<T>
getBooking()
          Retrieves a set containing all the elements for the reference booking.
 SingleBooking getBooking(boolean idIsPersistent, String id)
          Retrieves the value for the reference booking for the specified qualifier attribute value.
<T extends CompoundBooking>
Collection<T>
getCb()
          Retrieves a set containing all the elements for the reference cb.
 CompoundBooking getCb(boolean idIsPersistent, String id)
          Retrieves the value for the reference cb for the specified qualifier attribute value.
<T extends DepotType>
Collection<T>
getDepotType()
          Retrieves a set containing all the elements for the reference depotType.
 DepotType getDepotType(boolean idIsPersistent, String id)
          Retrieves the value for the reference depotType for the specified qualifier attribute value.
<T extends DepotEntity>
Collection<T>
getEntity()
          Retrieves a set containing all the elements for the reference entity.
 DepotEntity getEntity(boolean idIsPersistent, String id)
          Retrieves the value for the reference entity for the specified qualifier attribute value.
<T extends DepotEntityRelationship>
Collection<T>
getEntityRelationship()
          Retrieves a set containing all the elements for the reference entityRelationship.
 DepotEntityRelationship getEntityRelationship(boolean idIsPersistent, String id)
          Retrieves the value for the reference entityRelationship for the specified qualifier attribute value.
<T extends IndexEntry>
Collection<T>
getIndexEntry()
          Retrieves a set containing all the elements for the reference indexEntry.
 IndexEntry getIndexEntry(boolean idIsPersistent, String id)
          Retrieves the value for the reference indexEntry for the specified qualifier attribute value.
 List<String> getOwner()
          Retrieves a list containing all the elements for the attribute owner.
<T extends PrincipalGroup>
List<T>
getOwningGroup()
          Retrieves the Collection of objects referenced by owningGroup.
 User getOwningUser()
          Retrieves the value for the reference owningUser.
<T extends SimpleBooking>
Collection<T>
getSimpleBooking()
          Retrieves a set containing all the elements for the reference simpleBooking.
 SimpleBooking getSimpleBooking(boolean idIsPersistent, String id)
          Retrieves the value for the reference simpleBooking for the specified qualifier attribute value.
 ImportResult importItem(byte[] item, String itemMimeType, String itemName, short locale)
           
static org.openmdx.base.jdo2.Segment.Identity newIdentity(org.openmdx.base.cci2.Provider.Identity provider, boolean qualifiedNameIsPersistent, String qualifiedName)
           
protected  org.w3c.jdo2.AbstractObject.Slice newSlice(int index)
           
protected  List<String> openmdxjdoGetClass()
          Retrieve the model class
protected  int openmdxjdoGetSize(int field)
           
protected  void openmdxjdoSetSize(int field, int size)
           
static org.openmdx.base.jdo2.Segment.Identity openmdxjdoToIdentity(org.oasisopen.spi2.ObjectId objectId)
           
 ModifySecureObjectResult removeAllOwningGroup(short mode)
           
 ModifySecureObjectResult removeOwningGroup(PrincipalGroup group, short mode)
           
 ModifySecureObjectResult setAccessLevel(short accessLevelBrowse, short accessLevelDelete, short accessLevelUpdate, short mode)
           
 void setAccessLevelBrowse(short accessLevelBrowse)
          Sets a new value for the attribute accessLevelBrowse.
 void setAccessLevelDelete(short accessLevelDelete)
          Sets a new value for the attribute accessLevelDelete.
 void setAccessLevelUpdate(short accessLevelUpdate)
          Sets a new value for the attribute accessLevelUpdate.
 ModifySecureObjectResult setOwningUser(short mode, User user)
           
 void setOwningUser(User owningUser)
          Sets a new value for the reference owningUser.
 UpdateIndexResult updateIndex()
           
 
Methods inherited from class org.opencrx.kernel.jdo2.Segment
openmdxjdoGetSlices
 
Methods inherited from class org.openmdx.base.jdo2.Segment
addToProvider, addToProvider, getDescription, getProvider, getView, getView, jdoCopyFields, jdoCopyKeyFieldsFromObjectId, jdoCopyKeyFieldsFromObjectId, jdoCopyKeyFieldsToObjectId, jdoCopyKeyFieldsToObjectId, jdoGetObjectId, jdoGetPersistenceManager, jdoGetTransactionalObjectId, jdoGetVersion, jdoIsDeleted, jdoIsDetached, jdoIsDetachedInternal, jdoIsDirty, jdoIsNew, jdoIsPersistent, jdoIsTransactional, jdoMakeDirty, jdoNewInstance, jdoNewInstance, jdoNewObjectIdInstance, jdoNewObjectIdInstance, jdoPreSerialize, jdoProvideField, jdoProvideFields, jdoReplaceDetachedState, jdoReplaceField, jdoReplaceFields, jdoReplaceFlags, jdoReplaceStateManager, openmdxjdoGetObjectId, openmdxjdoGetObjectsByParent, setDescription
 
Methods inherited from class org.w3c.jdo2.AbstractObject
openmdxjdoClassName, openmdxjdoGetIdentityBuilder, openmdxjdoGetList, openmdxjdoGetObjectsByParent, openmdxjdoGetSet, openmdxjdoGetSparseArray, openmdxjdoNewSlice, openmdxjdoSetArray, openmdxjdoSetCollection, openmdxjdoToArray, openmdxjdoToArray, openmdxjdoValidateElement
 
Methods inherited from class org.oasisopen.jdo2.Identifiable
openmdxjdoGetObject, openmdxjdoGetObjectById, openmdxjdoGetObjectId, openmdxjdoGetObjectSet, openmdxjdoNewObjectId, openmdxjdoNewObjectId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openmdx.base.cci2.Segment
getDescription, getProvider, setDescription
 
Methods inherited from interface org.openmdx.compatibility.view1.cci2.ViewCapable
getView, getView
 

Field Detail

CLASS

public static final List<String> CLASS
Define the model class org::opencrx::kernel::depot1::Segment

Constructor Detail

Segment

public Segment()
Method Detail

getCb

public <T extends CompoundBooking> Collection<T> getCb()
Retrieves a set containing all the elements for the reference cb.

Returns:
A set containing all the elements for this reference.

getCb

public CompoundBooking getCb(boolean idIsPersistent,
                             String id)
Retrieves the value for the reference cb for the specified qualifier attribute value.

Parameters:
idIsPersistent - Defines whether value for the qualifier is persistent or not
id - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

getAccessLevelDelete

public short getAccessLevelDelete()
Retrieves the value for the attribute accessLevelDelete.

Specified by:
getAccessLevelDelete in interface SecureObject
Returns:
The non-null value for attribute accessLevelDelete.

setAccessLevelDelete

public void setAccessLevelDelete(short accessLevelDelete)
Sets a new value for the attribute accessLevelDelete.

Specified by:
setAccessLevelDelete in interface SecureObject
Parameters:
accessLevelDelete - The non-null new value for attribute accessLevelDelete.

exportXml

public ExportResult exportXml(String attributeFilter,
                              String referenceFilter)
Specified by:
exportXml in interface XmlExporter

getEntity

public <T extends DepotEntity> Collection<T> getEntity()
Retrieves a set containing all the elements for the reference entity.

Returns:
A set containing all the elements for this reference.

getEntity

public DepotEntity getEntity(boolean idIsPersistent,
                             String id)
Retrieves the value for the reference entity for the specified qualifier attribute value.

Parameters:
idIsPersistent - Defines whether value for the qualifier is persistent or not
id - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

addEntity

public void addEntity(boolean idIsPersistent,
                      String id,
                      DepotEntity entity)
Adds the specified element to the set of the values for the reference entity.

Note: This is an extension to the JMI 1 standard.

Parameters:
idIsPersistent - true if id is persistent
id - The qualifier attribute value that qualifies the reference to get the element to be appended.
entity - The element to be appended.

getAccessLevelBrowse

public short getAccessLevelBrowse()
Retrieves the value for the attribute accessLevelBrowse.

Specified by:
getAccessLevelBrowse in interface SecureObject
Returns:
The non-null value for attribute accessLevelBrowse.

setAccessLevelBrowse

public void setAccessLevelBrowse(short accessLevelBrowse)
Sets a new value for the attribute accessLevelBrowse.

Specified by:
setAccessLevelBrowse in interface SecureObject
Parameters:
accessLevelBrowse - The non-null new value for attribute accessLevelBrowse.

getDepotType

public <T extends DepotType> Collection<T> getDepotType()
Retrieves a set containing all the elements for the reference depotType.

Returns:
A set containing all the elements for this reference.

getDepotType

public DepotType getDepotType(boolean idIsPersistent,
                              String id)
Retrieves the value for the reference depotType for the specified qualifier attribute value.

Parameters:
idIsPersistent - Defines whether value for the qualifier is persistent or not
id - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

addDepotType

public void addDepotType(boolean idIsPersistent,
                         String id,
                         DepotType depotType)
Adds the specified element to the set of the values for the reference depotType.

Note: This is an extension to the JMI 1 standard.

Parameters:
idIsPersistent - true if id is persistent
id - The qualifier attribute value that qualifies the reference to get the element to be appended.
depotType - The element to be appended.

removeAllOwningGroup

public ModifySecureObjectResult removeAllOwningGroup(short mode)
Specified by:
removeAllOwningGroup in interface SecureObject

setOwningUser

public ModifySecureObjectResult setOwningUser(short mode,
                                              User user)
Specified by:
setOwningUser in interface SecureObject

getOwningGroup

public <T extends PrincipalGroup> List<T> getOwningGroup()
Retrieves the Collection of objects referenced by owningGroup.

Specified by:
getOwningGroup in interface SecureObject
Returns:
The Collection of referenced objects.

addOwningGroup

public ModifySecureObjectResult addOwningGroup(PrincipalGroup group,
                                               short mode)
Specified by:
addOwningGroup in interface SecureObject

getBooking

public <T extends SingleBooking> Collection<T> getBooking()
Retrieves a set containing all the elements for the reference booking.

Returns:
A set containing all the elements for this reference.

getBooking

public SingleBooking getBooking(boolean idIsPersistent,
                                String id)
Retrieves the value for the reference booking for the specified qualifier attribute value.

Parameters:
idIsPersistent - Defines whether value for the qualifier is persistent or not
id - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

checkPermissions

public CheckPermissionsResult checkPermissions(String principalName)
Specified by:
checkPermissions in interface SecureObject

getAudit

public <T extends AuditEntry> Collection<T> getAudit()
Retrieves a set containing all the elements for the reference audit.

Specified by:
getAudit in interface Auditee
Returns:
A set containing all the elements for this reference.

getAudit

public AuditEntry getAudit(boolean idIsPersistent,
                           String id)
Retrieves the value for the reference audit for the specified qualifier attribute value.

Specified by:
getAudit in interface Auditee
Parameters:
idIsPersistent - Defines whether value for the qualifier is persistent or not
id - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

removeOwningGroup

public ModifySecureObjectResult removeOwningGroup(PrincipalGroup group,
                                                  short mode)
Specified by:
removeOwningGroup in interface SecureObject

importItem

public ImportResult importItem(byte[] item,
                               String itemMimeType,
                               String itemName,
                               short locale)
Specified by:
importItem in interface Importer

getSimpleBooking

public <T extends SimpleBooking> Collection<T> getSimpleBooking()
Retrieves a set containing all the elements for the reference simpleBooking.

Returns:
A set containing all the elements for this reference.

getSimpleBooking

public SimpleBooking getSimpleBooking(boolean idIsPersistent,
                                      String id)
Retrieves the value for the reference simpleBooking for the specified qualifier attribute value.

Parameters:
idIsPersistent - Defines whether value for the qualifier is persistent or not
id - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

addSimpleBooking

public void addSimpleBooking(boolean idIsPersistent,
                             String id,
                             SimpleBooking simpleBooking)
Adds the specified element to the set of the values for the reference simpleBooking.

Note: This is an extension to the JMI 1 standard.

Parameters:
idIsPersistent - true if id is persistent
id - The qualifier attribute value that qualifies the reference to get the element to be appended.
simpleBooking - The element to be appended.

updateIndex

public UpdateIndexResult updateIndex()
Specified by:
updateIndex in interface Indexed

getAccessLevelUpdate

public short getAccessLevelUpdate()
Retrieves the value for the attribute accessLevelUpdate.

Specified by:
getAccessLevelUpdate in interface SecureObject
Returns:
The non-null value for attribute accessLevelUpdate.

setAccessLevelUpdate

public void setAccessLevelUpdate(short accessLevelUpdate)
Sets a new value for the attribute accessLevelUpdate.

Specified by:
setAccessLevelUpdate in interface SecureObject
Parameters:
accessLevelUpdate - The non-null new value for attribute accessLevelUpdate.

setAccessLevel

public ModifySecureObjectResult setAccessLevel(short accessLevelBrowse,
                                               short accessLevelDelete,
                                               short accessLevelUpdate,
                                               short mode)
Specified by:
setAccessLevel in interface SecureObject

getAccessGrantedByParent

public org.openmdx.base.cci2.BasicObject getAccessGrantedByParent()
Retrieves the value for the reference accessGrantedByParent.

Specified by:
getAccessGrantedByParent in interface SecureObject
Returns:
The – possibly null – value for this reference.

getOwner

public final List<String> getOwner()
Retrieves a list containing all the elements for the attribute owner.

Specified by:
getOwner in interface SecureObject
Returns:
A list containing all elements for this attribute.

getIndexEntry

public <T extends IndexEntry> Collection<T> getIndexEntry()
Retrieves a set containing all the elements for the reference indexEntry.

Specified by:
getIndexEntry in interface Indexed
Returns:
A set containing all the elements for this reference.

getIndexEntry

public IndexEntry getIndexEntry(boolean idIsPersistent,
                                String id)
Retrieves the value for the reference indexEntry for the specified qualifier attribute value.

Specified by:
getIndexEntry in interface Indexed
Parameters:
idIsPersistent - Defines whether value for the qualifier is persistent or not
id - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

getEntityRelationship

public <T extends DepotEntityRelationship> Collection<T> getEntityRelationship()
Retrieves a set containing all the elements for the reference entityRelationship.

Returns:
A set containing all the elements for this reference.

getEntityRelationship

public DepotEntityRelationship getEntityRelationship(boolean idIsPersistent,
                                                     String id)
Retrieves the value for the reference entityRelationship for the specified qualifier attribute value.

Parameters:
idIsPersistent - Defines whether value for the qualifier is persistent or not
id - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

addEntityRelationship

public void addEntityRelationship(boolean idIsPersistent,
                                  String id,
                                  DepotEntityRelationship entityRelationship)
Adds the specified element to the set of the values for the reference entityRelationship.

Note: This is an extension to the JMI 1 standard.

Parameters:
idIsPersistent - true if id is persistent
id - The qualifier attribute value that qualifies the reference to get the element to be appended.
entityRelationship - The element to be appended.

getOwningUser

public User getOwningUser()
Retrieves the value for the reference owningUser.

Specified by:
getOwningUser in interface SecureObject
Returns:
The – possibly null – value for this reference.

setOwningUser

public void setOwningUser(User owningUser)
Sets a new value for the reference owningUser.

Specified by:
setOwningUser in interface SecureObject
Parameters:
owningUser - The non-null new value for this reference.

openmdxjdoGetSize

protected int openmdxjdoGetSize(int field)
Overrides:
openmdxjdoGetSize in class Segment

openmdxjdoSetSize

protected void openmdxjdoSetSize(int field,
                                 int size)
Overrides:
openmdxjdoSetSize in class Segment

newSlice

protected org.w3c.jdo2.AbstractObject.Slice newSlice(int index)
Overrides:
newSlice in class Segment

openmdxjdoGetClass

protected List<String> openmdxjdoGetClass()
Retrieve the model class

Overrides:
openmdxjdoGetClass in class Segment
Returns:
the model class
See Also:
Segment.CLASS

newIdentity

public static org.openmdx.base.jdo2.Segment.Identity newIdentity(org.openmdx.base.cci2.Provider.Identity provider,
                                                                 boolean qualifiedNameIsPersistent,
                                                                 String qualifiedName)

openmdxjdoToIdentity

public static org.openmdx.base.jdo2.Segment.Identity openmdxjdoToIdentity(org.oasisopen.spi2.ObjectId objectId)


This software is published under the BSD license. Copyright © 2003-2008, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.