org.opencrx.kernel.code1.jdo2
Class CodeValueContainer

java.lang.Object
  extended by org.oasisopen.jdo2.Identifiable
      extended by org.w3c.jdo2.AbstractObject
          extended by org.opencrx.kernel.code1.jdo2.CodeValueContainer
All Implemented Interfaces:
Serializable, Importer, SecureObject, XmlExporter, CodeValueContainer, org.openmdx.base.cci2.BasicObject, org.openmdx.base.cci2.ContextCapable, org.openmdx.base.cci2.ExtentCapable, org.openmdx.compatibility.view1.cci2.ViewCapable

public class CodeValueContainer
extends org.w3c.jdo2.AbstractObject
implements CodeValueContainer

Class CodeValueContainer

See Also:
Serialized Form

Nested Class Summary
static class CodeValueContainer.Identity
          The object's application identity
static class CodeValueContainer.Slice
          Slice object hold the CodeValueContainer's multivalued attributes
 
Nested classes/interfaces inherited from class org.w3c.jdo2.AbstractObject
org.w3c.jdo2.AbstractObject.EmbeddedList<E>, org.w3c.jdo2.AbstractObject.EmbeddedSet<E>
 
Field Summary
static List<String> BASE_CLASS
          Define this class as base class
static List<String> CLASS
          Define the model class org::opencrx::kernel::code1::CodeValueContainer
 
Constructor Summary
CodeValueContainer()
           
 
Method Summary
 void addEntry(boolean codeIsPersistent, String code, AbstractEntry entry)
          Adds the specified element to the set of the values for the reference entry.
 ModifySecureObjectResult addOwningGroup(PrincipalGroup group, short mode)
           
 void addToSegment(Segment segment)
          Sets a new value for the reference segment.
 void addToSegment(Segment segment, boolean nameIsPersistent, String name)
          Set the object's composite association org:opencrx:kernel:code1:SegmentContainsValueContainer.
 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.
 Date getCreatedAt()
          Retrieves the value for the attribute createdAt.
 Set<String> getCreatedBy()
          Retrieves a set containing all the elements for the attribute createdBy.
<T extends AbstractEntry>
Collection<T>
getEntry()
          Retrieves a set containing all the elements for the reference entry.
 AbstractEntry getEntry(boolean codeIsPersistent, String code)
          Retrieves the value for the reference entry for the specified qualifier attribute value.
 String getIdentity()
          Retrieves the value for the attribute identity.
 Date getModifiedAt()
          Retrieves the value for the attribute modifiedAt.
 Set<String> getModifiedBy()
          Retrieves a set containing all the elements for the attribute modifiedBy.
 Set<String> getName()
          Retrieves a set containing all the elements for the attribute name.
 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 org.openmdx.compatibility.view1.cci2.View>
Collection<T>
getView()
          Retrieves a set containing all the elements for the reference view.
 org.openmdx.compatibility.view1.cci2.View getView(boolean namespaceIsPersistent, String namespace)
          Retrieves the value for the reference view for the specified qualifier attribute value.
 ImportResult importItem(byte[] item, String itemMimeType, String itemName, short locale)
           
static CodeValueContainer.Identity newIdentity(org.openmdx.base.cci2.Segment.Identity segment, boolean nameIsPersistent, String name)
           
protected  org.w3c.jdo2.AbstractObject.Slice newSlice(int index)
           
protected  List<String> openmdxjdoGetClass()
          Retrieve the model class
protected  String openmdxjdoGetObjectId()
          Retrieve the object's JDO identity key
static CloseableCollection<CodeValueContainer> openmdxjdoGetObjectsByParent(Segment segment)
          Navigate through an object's composite association
protected  int openmdxjdoGetSize(int field)
           
protected
<E extends org.w3c.jdo2.AbstractObject.Slice>
SortedMap<Integer,E>
openmdxjdoGetSlices()
           
protected  void openmdxjdoSetSize(int field, int size)
           
static CodeValueContainer.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.
 void setName(String... name)
          Clears name and adds the given value(s).
 ModifySecureObjectResult setOwningUser(short mode, User user)
           
 void setOwningUser(User owningUser)
          Sets a new value for the reference owningUser.
 
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
 

Field Detail

CLASS

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


BASE_CLASS

public static final List<String> BASE_CLASS
Define this class as base class

See Also:
CodeValueContainer.CLASS
Constructor Detail

CodeValueContainer

public CodeValueContainer()
Method Detail

openmdxjdoGetObjectId

protected String openmdxjdoGetObjectId()
Retrieve the object's JDO identity key

Specified by:
openmdxjdoGetObjectId in class org.oasisopen.jdo2.Identifiable
Returns:
the value of the object's JDO identity key

openmdxjdoGetSlices

protected final <E extends org.w3c.jdo2.AbstractObject.Slice> SortedMap<Integer,E> openmdxjdoGetSlices()
Overrides:
openmdxjdoGetSlices in class org.w3c.jdo2.AbstractObject

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

getModifiedAt

public Date getModifiedAt()
Retrieves the value for the attribute modifiedAt.

Specified by:
getModifiedAt in interface org.openmdx.base.cci2.BasicObject
Returns:
The non-null value for attribute modifiedAt.

getModifiedBy

public final Set<String> getModifiedBy()
Retrieves a set containing all the elements for the attribute modifiedBy.

Specified by:
getModifiedBy in interface org.openmdx.base.cci2.BasicObject
Returns:
A set containing all elements for this attribute.

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.

getIdentity

public String getIdentity()
Retrieves the value for the attribute identity.

Specified by:
getIdentity in interface org.openmdx.base.cci2.ExtentCapable
Returns:
The non-null value for attribute identity.

removeAllOwningGroup

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

getCreatedAt

public Date getCreatedAt()
Retrieves the value for the attribute createdAt.

Specified by:
getCreatedAt in interface org.openmdx.base.cci2.BasicObject
Returns:
The non-null value for attribute createdAt.

getName

public final Set<String> getName()
Retrieves a set containing all the elements for the attribute name.

Specified by:
getName in interface CodeValueContainer
Returns:
A set containing all elements for this attribute.

setName

public void setName(String... name)
Clears name and adds the given value(s).

This method is equivalent to

   set.clear();
   set.addAll(Arrays.asList(name));
 

Specified by:
setName in interface CodeValueContainer
Parameters:
name - value(s) to be added to name

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

checkPermissions

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

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

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.

getCreatedBy

public final Set<String> getCreatedBy()
Retrieves a set containing all the elements for the attribute createdBy.

Specified by:
getCreatedBy in interface org.openmdx.base.cci2.BasicObject
Returns:
A set containing all elements for this attribute.

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.

getEntry

public <T extends AbstractEntry> Collection<T> getEntry()
Retrieves a set containing all the elements for the reference entry.

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

getEntry

public AbstractEntry getEntry(boolean codeIsPersistent,
                              String code)
Retrieves the value for the reference entry for the specified qualifier attribute value.

Specified by:
getEntry in interface CodeValueContainer
Parameters:
codeIsPersistent - Defines whether value for the qualifier is persistent or not
code - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

addEntry

public void addEntry(boolean codeIsPersistent,
                     String code,
                     AbstractEntry entry)
Adds the specified element to the set of the values for the reference entry.

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

Specified by:
addEntry in interface CodeValueContainer
Parameters:
codeIsPersistent - true if code is persistent
code - The qualifier attribute value that qualifies the reference to get the element to be appended.
entry - The element to be appended.

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.

getView

public <T extends org.openmdx.compatibility.view1.cci2.View> Collection<T> getView()
Retrieves a set containing all the elements for the reference view.

Specified by:
getView in interface org.openmdx.compatibility.view1.cci2.ViewCapable
Returns:
A set containing all the elements for this reference.

getView

public org.openmdx.compatibility.view1.cci2.View getView(boolean namespaceIsPersistent,
                                                         String namespace)
Retrieves the value for the reference view for the specified qualifier attribute value.

Specified by:
getView in interface org.openmdx.compatibility.view1.cci2.ViewCapable
Parameters:
namespaceIsPersistent - Defines whether value for the qualifier is persistent or not
namespace - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

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 org.w3c.jdo2.AbstractObject

openmdxjdoSetSize

protected void openmdxjdoSetSize(int field,
                                 int size)
Overrides:
openmdxjdoSetSize in class org.w3c.jdo2.AbstractObject

newSlice

protected org.w3c.jdo2.AbstractObject.Slice newSlice(int index)

openmdxjdoGetClass

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

Returns:
the model class
See Also:
CodeValueContainer.CLASS

addToSegment

public void addToSegment(Segment segment)
Sets a new value for the reference segment.

Parameters:
segment - The non-null new value for this reference.

openmdxjdoGetObjectsByParent

public static CloseableCollection<CodeValueContainer> openmdxjdoGetObjectsByParent(Segment segment)
Navigate through an object's composite association


addToSegment

public void addToSegment(Segment segment,
                         boolean nameIsPersistent,
                         String name)
Set the object's composite association org:opencrx:kernel:code1:SegmentContainsValueContainer.

Parameters:
segment - The non-null new value for this object's composite owner.
nameIsPersistent - Defines whether the name is persistent.
name - The non-null new value for this object's qualifier.

newIdentity

public static CodeValueContainer.Identity newIdentity(org.openmdx.base.cci2.Segment.Identity segment,
                                                      boolean nameIsPersistent,
                                                      String name)

openmdxjdoToIdentity

public static CodeValueContainer.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.