org.outerj.daisy.query.model
Class Identifier

java.lang.Object
  extended byorg.outerj.daisy.query.model.Identifier

public final class Identifier
extends java.lang.Object


Nested Class Summary
 class Identifier.AbstractLoginIdentifier
           
 class Identifier.AbstractNonAclIdentifier
           
 class Identifier.AbstractOutputIdentifier
           
 class Identifier.BranchIdIdentifier
           
 class Identifier.BranchNameIdentifier
           
 class Identifier.CollectionsIdentifier
           
 class Identifier.CollectionsValueCountIdentifier
           
 class Identifier.CreationTimeIdentifier
           
 class Identifier.CustomFieldIdentifier
           
 class Identifier.DocumentIdIdentifier
           
 class Identifier.DocumentNameIdentifier
           
 class Identifier.DocumentTypeIdentifier
           
 class Identifier.FieldIdentifier
           
 class Identifier.FieldValueCountIdentifier
           
 class Identifier.LanguageIdIdentifier
           
 class Identifier.LanguageNameIdentifier
           
 class Identifier.LastModifiedIdentifier
           
 class Identifier.LastModifierIdIdentifier
           
 class Identifier.LastModifierLoginIdentifier
           
 class Identifier.LastModifierNameIdentifier
           
 class Identifier.LockDurationIdentifier
           
 class Identifier.LockOwnerIdIdentifier
           
 class Identifier.LockOwnerLoginIdentifier
           
 class Identifier.LockOwnerNameIdentifier
           
 class Identifier.LockTimeAcquiredIdentifier
           
 class Identifier.LockTypeIdentifier
           
 class Identifier.OwnerIdIdentifier
           
 class Identifier.OwnerLoginIdentifier
           
 class Identifier.OwnerNameIdentifier
           
 class Identifier.PartContentIdentifier
           
 class Identifier.PartMimeTypeIdentifier
           
 class Identifier.PartSizeIdentifier
           
 class Identifier.PrivateIdentifier
           
 class Identifier.RetiredIdentifier
           
 class Identifier.SummaryIdentifier
           
 class Identifier.TotalSizeOfPartsIdentifier
           
 class Identifier.VariantLastModifiedIdentifier
           
 class Identifier.VariantLastModifierIdIdentifier
           
 class Identifier.VariantLastModifierLoginIdentifier
           
 class Identifier.VariantLastModifierNameIdentifier
           
 class Identifier.VersionCreationTimeIdentifier
           
 class Identifier.VersionCreatorIdIdentifier
           
 class Identifier.VersionCreatorLoginIdentifier
           
 class Identifier.VersionCreatorNameIdentifier
           
 class Identifier.VersionIdIdentifier
           
 class Identifier.VersionStateIdentifier
           
 class Identifier.VersionStateLastModifiedIdentifier
           
 
Constructor Summary
  Identifier(java.lang.String id)
           
protected Identifier(java.lang.String id, QueryContext context, org.outerj.daisy.query.model.Identifier.DelegateIdentifier delegate)
           
 
Method Summary
 int bindSql(java.sql.PreparedStatement stmt, int bindPos)
           
 boolean canTestAppliesTo()
          Must only be implemented by classes for which isAclAllowed returns null.
 void convertLiteral(Literal literal)
          See isSymbolic().
 void generateSql(java.lang.StringBuffer sql, SqlGenerationContext context)
           
 java.lang.Object getAppliesToValue(long documentType, long collection)
          Must only be implemented by classes for which canTestAppliesTo() returns true.
 org.outerj.daisy.query.model.Identifier.DelegateIdentifier getDelegate()
           
 java.lang.String getName()
           
 java.lang.Object getOutputValue(org.outerj.daisy.repository.Document document, org.outerj.daisy.repository.Version version)
          Returns the output value of this identifier for the given document.
 OutputValueType getOutputValueType()
          Identifies the type of data returned from the getOutputValue(org.outerj.daisy.repository.Document, org.outerj.daisy.repository.Version) method.
 java.lang.String getTitle(java.util.Locale locale)
           
 java.lang.Object getValue(org.outerj.daisy.repository.Document document)
          Returns the value of this identifier for the given document.
 org.outerj.daisy.repository.ValueType getValueType()
          Identifies the type of data returned from the getValue(org.outerj.daisy.repository.Document) method.
 AclConditionViolation isAclAllowed()
          May this identifier be used in ACL evaluation expressions?
 boolean isComparable()
           
 boolean isMultiValue()
           
 boolean isOutputOnly()
          If true, then this identifier does not present a field on which can be searched, and only the method getOutputValue should be called on it.
 boolean isSymbolic()
          A symbolic identifier is an identifier that identifies an object by name in the query, but uses an ID to search on the database.
 void prepare(QueryContext context)
           
 void prepareInWhereClause(QueryContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Identifier

public Identifier(java.lang.String id)

Identifier

protected Identifier(java.lang.String id,
                     QueryContext context,
                     org.outerj.daisy.query.model.Identifier.DelegateIdentifier delegate)
Method Detail

getName

public java.lang.String getName()

prepare

public void prepare(QueryContext context)
             throws QueryException
Throws:
QueryException

prepareInWhereClause

public void prepareInWhereClause(QueryContext context)
                          throws QueryException
Throws:
QueryException

generateSql

public void generateSql(java.lang.StringBuffer sql,
                        SqlGenerationContext context)

bindSql

public int bindSql(java.sql.PreparedStatement stmt,
                   int bindPos)
            throws java.sql.SQLException
Throws:
java.sql.SQLException

getValueType

public org.outerj.daisy.repository.ValueType getValueType()
Identifies the type of data returned from the getValue(org.outerj.daisy.repository.Document) method.


isMultiValue

public boolean isMultiValue()

getValue

public java.lang.Object getValue(org.outerj.daisy.repository.Document document)
Returns the value of this identifier for the given document. The information will be retrieved from the data available in the document object, thus the data of the last version or possible unsaved data, except of course for identifiers that apply specifically to a version, in which case the information will be retrieved from the last version.


getOutputValueType

public OutputValueType getOutputValueType()
Identifies the type of data returned from the getOutputValue(org.outerj.daisy.repository.Document, org.outerj.daisy.repository.Version) method.


getOutputValue

public final java.lang.Object getOutputValue(org.outerj.daisy.repository.Document document,
                                             org.outerj.daisy.repository.Version version)
Returns the output value of this identifier for the given document. Warning for implementations: the version parameter is allowed to be null. This can be the case when the requested information is needed for the live version of the document, but the document has no live version yet.


getTitle

public java.lang.String getTitle(java.util.Locale locale)

isAclAllowed

public AclConditionViolation isAclAllowed()
May this identifier be used in ACL evaluation expressions?


canTestAppliesTo

public boolean canTestAppliesTo()
Must only be implemented by classes for which isAclAllowed returns null.


getAppliesToValue

public java.lang.Object getAppliesToValue(long documentType,
                                          long collection)
Must only be implemented by classes for which canTestAppliesTo() returns true.


isSymbolic

public boolean isSymbolic()
A symbolic identifier is an identifier that identifies an object by name in the query, but uses an ID to search on the database.

A symbolic identifier requires that literals be converted using convertLiteral(org.outerj.daisy.query.model.Literal).


convertLiteral

public void convertLiteral(Literal literal)
                    throws QueryException
See isSymbolic(). It is not needed nor required to call this method if isSymbolic returns false.

Throws:
QueryException

isOutputOnly

public boolean isOutputOnly()
If true, then this identifier does not present a field on which can be searched, and only the method getOutputValue should be called on it.


isComparable

public boolean isComparable()

getDelegate

public org.outerj.daisy.query.model.Identifier.DelegateIdentifier getDelegate()


Copyright © -2005 . All Rights Reserved.