com.waveset.object
Class RepositoryResult.Row

java.lang.Object
  extended bycom.waveset.object.RepositoryResult.Row
Enclosing class:
RepositoryResult

public static class RepositoryResult.Row
extends java.lang.Object

This class is used to represent each "row" of the result.

There will be two common forms of result:

  1. Information Results - each row contains the type, id, name, and attributes but not the object.
  2. Object Results - each row contains the PersistentObject itself.
  3. Information results are typically returned by repository queries used to gather information about objects in order that one or more may be selected for futher processing. Since we don't know which objects will be selected, we don't bring them entirely into memory.

    Object results are returned by repository queries where some collection of objects is known to be required. The information fields will also be set up.

    It is the responsibility of the application to know which sort of result it is dealing with.


    Field Summary
    static java.lang.String EL_OBJECT
               
    static java.lang.String EL_ROW
               
     
    Constructor Summary
    protected RepositoryResult.Row()
              Create an empty row.
    protected RepositoryResult.Row(org.w3c.dom.Element e)
              Create a row, and flesh it out by parsing its DOM representation.
      RepositoryResult.Row(int index, LockInfo lockInfo)
               
      RepositoryResult.Row(int index, ObjectRef or)
               
      RepositoryResult.Row(int index, PersistentObject po)
               
      RepositoryResult.Row(int index, Type type, java.lang.String name, java.lang.String id, WSAttributes attributes)
               
      RepositoryResult.Row(LockInfo lockInfo)
              Create a row containing lock information for an object.
      RepositoryResult.Row(ObjectRef or)
              Create a row containing object information taken from an object reference.
      RepositoryResult.Row(PersistentObject po)
              Create a row containing a reference to an object.
      RepositoryResult.Row(Type type, java.lang.String name, java.lang.String id, PersistentObject po, LockInfo lockInfo, WSAttributes attributes)
              Create a row containing object information.
      RepositoryResult.Row(Type type, java.lang.String name, java.lang.String displayName, java.lang.String id, WSAttributes attributes)
              Create a row containing object information, including the displayName
      RepositoryResult.Row(Type type, java.lang.String name, java.lang.String id, WSAttributes attributes)
              Create a row containing object information.
     
    Method Summary
     void clearObject()
              Null out the PersistentObject stored with this row, if any.
     java.lang.String getAttribute(Attribute attr)
              Convenience method to get one attribute value by registered Attribute.
     java.lang.String getAttribute(java.lang.String name)
              Convenience method to get one summary attribute value by name.
     WSAttributes getAttributes()
              Return the summary attributes exposed by this object.
     java.lang.Object[] getAttributeValues(Attribute attr)
              Convenience method to get one multivalued summary attribute value by name.
     java.lang.Object[] getAttributeValues(java.lang.String name)
               
     java.lang.String[] getAttributeValuesAsStrings(Attribute attr)
              Convenience method to get one multivalued summary attribute's values by name.
     java.lang.String[] getAttributeValuesAsStrings(java.lang.String name)
               
     java.lang.String getDisplayableName()
              Get the object displayabl name.
     java.lang.String getDisplayName()
              Get the object display name.
     java.lang.String getId()
              Get the object ID.
     java.lang.String getIdOrName()
              Get the object ID or name (preferring id).
     java.lang.String getLockedBy()
              Get the name of the user holding a lock on this object.
     LockInfo getLockInfo()
              Get the object lock information.
     java.lang.String getName()
              Get the object name.
     java.lang.String getNameOrId()
              Get the object name or id (preferring name).
     PersistentObject getObject()
              Get the PersistentObject stored with this row, if any.
     WSAttributes getSummaryAttributes()
              Deprecated. since GA 1.2. Use getAttributes().
     Type getType()
              Get the object type.
     WSAttribute getWSAttribute(java.lang.String name)
              Convenience method to get one attribute by registered Attribute.
    protected  void setAttributes(WSAttributes attributes)
              Set the summary attributes for this object.
    protected  void setDisplayName(java.lang.String s)
              Set the object display name.
    protected  void setId(java.lang.String s)
              Set the object ID.
    protected  void setLockInfo(LockInfo li)
              Set the object lock information.
    protected  void setName(java.lang.String s)
              Set the object name.
    protected  void setObject(PersistentObject po)
              Set the PersistentObject stored with this row, if any.
    protected  void setType(Type type)
              Set the object type.
     java.lang.String toString()
               
     void toXml(java.lang.StringBuffer b)
              Serialize a row into an XML buffer.
     void toXml(java.lang.StringBuffer b, int indent)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    EL_ROW

    public static final java.lang.String EL_ROW
    See Also:
    Constant Field Values

    EL_OBJECT

    public static final java.lang.String EL_OBJECT
    See Also:
    Constant Field Values
    Constructor Detail

    RepositoryResult.Row

    protected RepositoryResult.Row()
    Create an empty row.


    RepositoryResult.Row

    protected RepositoryResult.Row(org.w3c.dom.Element e)
                            throws WavesetException
    Create a row, and flesh it out by parsing its DOM representation.


    RepositoryResult.Row

    public RepositoryResult.Row(PersistentObject po)
    Create a row containing a reference to an object. We go ahead and set up the object information fields for consistency too.


    RepositoryResult.Row

    public RepositoryResult.Row(LockInfo lockInfo)
    Create a row containing lock information for an object.


    RepositoryResult.Row

    public RepositoryResult.Row(Type type,
                                java.lang.String name,
                                java.lang.String id,
                                PersistentObject po,
                                LockInfo lockInfo,
                                WSAttributes attributes)
    Create a row containing object information.


    RepositoryResult.Row

    public RepositoryResult.Row(Type type,
                                java.lang.String name,
                                java.lang.String id,
                                WSAttributes attributes)
    Create a row containing object information.


    RepositoryResult.Row

    public RepositoryResult.Row(Type type,
                                java.lang.String name,
                                java.lang.String displayName,
                                java.lang.String id,
                                WSAttributes attributes)
    Create a row containing object information, including the displayName


    RepositoryResult.Row

    public RepositoryResult.Row(ObjectRef or)
    Create a row containing object information taken from an object reference.


    RepositoryResult.Row

    public RepositoryResult.Row(int index,
                                PersistentObject po)

    RepositoryResult.Row

    public RepositoryResult.Row(int index,
                                LockInfo lockInfo)

    RepositoryResult.Row

    public RepositoryResult.Row(int index,
                                Type type,
                                java.lang.String name,
                                java.lang.String id,
                                WSAttributes attributes)

    RepositoryResult.Row

    public RepositoryResult.Row(int index,
                                ObjectRef or)
    Method Detail

    toString

    public java.lang.String toString()

    getType

    public Type getType()
    Get the object type.


    setType

    protected void setType(Type type)
    Set the object type.


    getNameOrId

    public java.lang.String getNameOrId()
    Get the object name or id (preferring name).


    getIdOrName

    public java.lang.String getIdOrName()
    Get the object ID or name (preferring id).


    getId

    public java.lang.String getId()
    Get the object ID.


    setId

    protected void setId(java.lang.String s)
    Set the object ID.


    getName

    public java.lang.String getName()
    Get the object name.


    setName

    protected void setName(java.lang.String s)
    Set the object name.


    getDisplayName

    public java.lang.String getDisplayName()
    Get the object display name.


    getDisplayableName

    public java.lang.String getDisplayableName()
    Get the object displayabl name.


    setDisplayName

    protected void setDisplayName(java.lang.String s)
    Set the object display name.


    getLockInfo

    public LockInfo getLockInfo()
    Get the object lock information.


    getLockedBy

    public java.lang.String getLockedBy()
    Get the name of the user holding a lock on this object. A convenience method built upon getLockInfo.

    See Also:
    getLockInfo()

    setLockInfo

    protected void setLockInfo(LockInfo li)
    Set the object lock information.


    getSummaryAttributes

    public WSAttributes getSummaryAttributes()
    Deprecated. since GA 1.2. Use getAttributes().

    Return the summary attributes exposed by this object.

    These were originally called "summary" attributes, but we're now referring to them as "query" attributes over in PersistentObject. We could probably avoid the issue here, and just refer to them as "attributes".


    getAttributes

    public WSAttributes getAttributes()
    Return the summary attributes exposed by this object.

    These were originally called "summary" attributes, but we're now referring to them as "query" attributes over in PersistentObject. We could probably avoid the issue here, and just refer to them as "attributes".


    setAttributes

    protected void setAttributes(WSAttributes attributes)
    Set the summary attributes for this object.

    GPC: may not need this if constructor will suffice.


    getObject

    public PersistentObject getObject()
    Get the PersistentObject stored with this row, if any.


    setObject

    protected void setObject(PersistentObject po)
    Set the PersistentObject stored with this row, if any.


    clearObject

    public void clearObject()
    Null out the PersistentObject stored with this row, if any.


    getAttribute

    public java.lang.String getAttribute(Attribute attr)
    Convenience method to get one attribute value by registered Attribute.


    getWSAttribute

    public WSAttribute getWSAttribute(java.lang.String name)
    Convenience method to get one attribute by registered Attribute.


    getAttribute

    public java.lang.String getAttribute(java.lang.String name)
    Convenience method to get one summary attribute value by name.


    getAttributeValues

    public java.lang.Object[] getAttributeValues(Attribute attr)
    Convenience method to get one multivalued summary attribute value by name.


    getAttributeValues

    public java.lang.Object[] getAttributeValues(java.lang.String name)

    getAttributeValuesAsStrings

    public java.lang.String[] getAttributeValuesAsStrings(Attribute attr)
    Convenience method to get one multivalued summary attribute's values by name. Coerces into an array of strings before returning.


    getAttributeValuesAsStrings

    public java.lang.String[] getAttributeValuesAsStrings(java.lang.String name)

    toXml

    public void toXml(java.lang.StringBuffer b)
    Serialize a row into an XML buffer.


    toXml

    public void toXml(java.lang.StringBuffer b,
                      int indent)