public class S_LibraryObjectSelector extends Object
S_LibraryObject| Modifier and Type | Field and Description | 
|---|---|
protected Long | 
m_ClassId  | 
protected SortSpecification | 
m_IdSortSpecification  | 
protected SortSpecification | 
m_NameSortSpecification  | 
protected S_LibrarySession | 
m_Session  | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
S_LibraryObjectSelector(S_LibrarySession session,
                       Long classId)
Constructs a S_LibraryObjectSelector object, with the classId
 that it is servicing specified. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
closeCursor(S_LibraryObjectCursor cursor)
Best effort to close a cursor. 
 | 
protected void | 
ensureDefaultClass(SortSpecification sort)
Ensure that the specified SortSpecification has
 a valid default class set. 
 | 
protected S_LibraryObjectData | 
findObjectById(Long id)
Find an object by ID. 
 | 
protected String | 
generateStatementName(String classname,
                     SortSpecification sort,
                     String stmtSuffix)
Generates a statement name. 
 | 
protected String | 
generateStatementName(String classname,
                     String stmtSuffix)
Generates a statement name. 
 | 
protected String | 
generateStatementName(String classname,
                     String relname,
                     SortSpecification sort,
                     String stmtSuffix)
Generates a statement name. 
 | 
protected String | 
generateStatementName(String classname,
                     String relname,
                     String stmtSuffix)
Generates a statement name. 
 | 
protected S_ClassObjectData | 
getClassData()
Gets the Data object. 
 | 
protected S_ClassObjectData | 
getClassData(Long classId)
Gets the ClassData object for the specified class ID. 
 | 
protected Long | 
getClassId()
Gets the ID of the class this selector is servicing. 
 | 
protected String | 
getClassName()
Get the class's name that this instance services. 
 | 
protected LibraryQueryStatement | 
getComplexQueryStatement(LibraryConnection lconn,
                        PreparedSelectorSpecification pss,
                        boolean countOnly)
Gets a statement for a complex query specified 
 by a PreparedSelectorSpecification. 
 | 
protected long | 
getCountFromResultSet(ResultSet rset)
Gets the count from a ResultSet opened with "select count()" query. 
 | 
protected SortSpecification | 
getIdSortSpecification()
Returns the ID Sort Specification to be used
 by this selector. 
 | 
protected SortSpecification | 
getNameSortSpecification()
Returns the Name Sort Specification to be used
 by this selector. 
 | 
protected String | 
getResourceString(String key)
Returns a resource string from the Resource Bundle. 
 | 
protected LibraryQueryStatement | 
getSearchResultQueryStatement(LibraryConnection lconn,
                             PreparedSelectorSpecification pss)
Gets a statement for a query for "search results", 
 meaning specific columns are selected from the specified
 search targets. 
 | 
protected S_LibraryService | 
getService()
Returns the S_LibraryService which created
 the S_LibrarySession from which this object was created. 
 | 
protected LibraryQueryStatement | 
getSimpleCountQueryStatement(String key,
                            LibraryConnection lconn,
                            String whereClause,
                            int maxCopies)
Gets a statement for a simple "select count()" query. 
 | 
protected LibraryQueryStatement | 
getSimpleQueryStatement(String key,
                       LibraryConnection lconn,
                       String whereClause,
                       SortSpecification sort,
                       int maxCopies)
Gets a statement for a simple query. 
 | 
protected String | 
getStatementSuffix()
Returns a statement suffix appropriate to the current
 session Admin mode. 
 | 
protected S_LibraryObjectData | 
nextItem(S_LibraryObjectCursor cursor)
Gets the next item from a cursor. 
 | 
protected Vector | 
selectAllObjects()
Select all objects. 
 | 
protected Vector | 
selectArrayReferencingObjects(AttributeValue referencedValue,
                             Long attributeId,
                             SortSpecification sort)
Selects objects based an array attribute referencing the specified object. 
 | 
protected long | 
selectArrayReferencingObjectsCount(AttributeValue referencedValue,
                                  Long attributeId)
Selects the count based an array attribute referencing the specified object. 
 | 
protected S_LibraryObjectCursor | 
selectArrayReferencingObjectsCursor(AttributeValue referencedValue,
                                   Long attributeId,
                                   SortSpecification sort)
Selects cursor for query based an array attribute referencing the 
 specified object. 
 | 
protected long | 
selectCount(PreparedSelectorSpecification pss)
Perform a complex "select count()" query for S_PreparedSelector, 
 using inputs from the specified PreparedSelectorSpecification. 
 | 
protected long | 
selectCount(String whereClause)
Perform a "select count()" query. 
 | 
protected S_LibraryObjectData | 
selectObjectById(Long id)
Selects an object by ID. 
 | 
protected Vector | 
selectObjects(PreparedSelectorSpecification pss)
Select objects for a S_PreparedSelector, using inputs from the specified
 PreparedSelectorSpecification. 
 | 
protected Vector | 
selectObjects(String whereClause,
             SortSpecification sort)
Select objects for a one-time use S_Selector. 
 | 
protected Vector | 
selectObjects(String whereClause,
             SortSpecification sort,
             int maxItemCount)
Select objects for a one-time use S_Selector. 
 | 
Vector | 
selectObjectsByMasterId(Long masterId,
                       String masterAttrName,
                       SortSpecification sort)
Selects objects for a detail table, using the specified master ID. 
 | 
protected Vector | 
selectObjectsByStringAttribute(String attrValue,
                              String masterAttrName,
                              SortSpecification sort)
Selects objects by a String attribute. 
 | 
protected long | 
selectObjectsCountByMasterId(Long masterId,
                            String masterAttrName)
Selects count of objects by master ID. 
 | 
protected S_LibraryObjectCursor | 
selectObjectsCursor(String whereClause,
                   SortSpecification sort)
Open a cursor. 
 | 
protected S_LibraryObjectCursor | 
selectObjectsCursorByMasterId(Long masterId,
                             String masterAttrName,
                             SortSpecification sort)
Selects cursor for selecting objects by master ID. 
 | 
protected S_LibraryObjectCursor | 
selectObjectsCursorByStringAttribute(String attrValue,
                                    String masterAttrName,
                                    SortSpecification sort)
Selects cursor for selecting objects by string attribute. 
 | 
protected boolean | 
selectObjectsExistByMasterId(Long masterId,
                            String masterAttrName)
Checks for the existence of an object by master ID. 
 | 
protected AttributeValueTable[] | 
selectResults(PreparedSelectorSpecification pss)
Select results for a S_PreparedSelector, using inputs from the specified
 PreparedSelectorSpecification. 
 | 
protected S_LibrarySession m_Session
protected Long m_ClassId
protected SortSpecification m_IdSortSpecification
protected SortSpecification m_NameSortSpecification
protected S_LibraryObjectSelector(S_LibrarySession session, Long classId) throws IfsException
session - session contextclassId - the class Id that the selector is servingIfsException - if the operation failsprotected Long getClassId()
protected S_ClassObjectData getClassData() throws IfsException
IfsException - if operation fails.protected S_ClassObjectData getClassData(Long classId) throws IfsException
classId - the class IDIfsException - if operation fails.protected String getClassName() throws IfsException
IfsException - if operation fails.protected S_LibraryService getService() throws IfsException
IfsException - if operation fails.protected String getResourceString(String key) throws MissingResourceException, IfsException
MissingResourceException - if the String cannot be found.IfsException - if operation fails.protected SortSpecification getNameSortSpecification() throws IfsException
IfsException - if operation fails.protected SortSpecification getIdSortSpecification() throws IfsException
IfsException - if operation fails.protected void ensureDefaultClass(SortSpecification sort) throws IfsException
sort - a Sort specificationIfsException - if operation fails.protected Vector selectAllObjects() throws IfsException
IfsException - if operation fails.protected Vector selectObjects(String whereClause, SortSpecification sort) throws IfsException
Indicates no constraint for the maximum item count.
whereClause - select where clausesort - the sort specificationIfsException - if the operation fails.protected Vector selectObjects(String whereClause, SortSpecification sort, int maxItemCount) throws IfsException
whereClause - select where clausesort - the sort specificationmaxItemCount - the maximum number of items to selectIfsException - if the operation fails.protected Vector selectObjects(PreparedSelectorSpecification pss) throws IfsException
pss - the PreparedSelectorSpecification which holds
                           all query settingsIfsException - if the operation fails.protected AttributeValueTable[] selectResults(PreparedSelectorSpecification pss) throws IfsException
pss - the PreparedSelectorSpecification which holds
                           all query settingsIfsException - if the operation fails.protected S_LibraryObjectCursor selectObjectsCursor(String whereClause, SortSpecification sort) throws IfsException
whereClause - search where clausesort - the sort specificationIfsException - if the operation fails.protected long selectCount(String whereClause) throws IfsException
whereClause - search where clauseIfsException - if the operation fails.protected long selectCount(PreparedSelectorSpecification pss) throws IfsException
pss - the PreparedSelectorSpecification which holds
                           all query settingsIfsException - if the operation fails.protected LibraryQueryStatement getSimpleQueryStatement(String key, LibraryConnection lconn, String whereClause, SortSpecification sort, int maxCopies) throws IfsException
key - statement keylconn - connection contextwhereClause - search where clausesort - sort specificationmaxCopies - max number of statement copies to keepIfsException - if the operation fails.protected LibraryQueryStatement getComplexQueryStatement(LibraryConnection lconn, PreparedSelectorSpecification pss, boolean countOnly) throws IfsException
lconn - connection contextpss - the PreparedSelectorSpecification containing all query settingscountOnly - indicates if this is for a select count(*) queryIfsException - if the operation fails.protected LibraryQueryStatement getSearchResultQueryStatement(LibraryConnection lconn, PreparedSelectorSpecification pss) throws IfsException
lconn - connection contextpss - the PreparedSelectorSpecification containing all query settingsIfsException - if the operation fails.protected LibraryQueryStatement getSimpleCountQueryStatement(String key, LibraryConnection lconn, String whereClause, int maxCopies) throws IfsException
key - statement keylconn - connection contextwhereClause - search where clausemaxCopies - max number of statement copies to keepIfsException - if the operation fails.protected S_LibraryObjectData selectObjectById(Long id) throws IfsException
id - object ID.IfsException - if the operation fails.protected S_LibraryObjectData findObjectById(Long id) throws IfsException
id - object ID.IfsException - if the operation fails.public Vector selectObjectsByMasterId(Long masterId, String masterAttrName, SortSpecification sort) throws IfsException
masterId - the master IDmasterAttrName - the attribute name for the master ID referencesort - the sort specificationIfsException - if the operation fails.protected Vector selectArrayReferencingObjects(AttributeValue referencedValue, Long attributeId, SortSpecification sort) throws IfsException
Only works for object-type array attributes.
referencedValue - the value being searched forattributeId - the array attributesort - the sort specificationIfsException - if the operation fails.protected long selectArrayReferencingObjectsCount(AttributeValue referencedValue, Long attributeId) throws IfsException
Only works for object-type array attributes.
referencedValue - the value being searched forattributeId - the array attributeIfsException - if the operation fails.protected Vector selectObjectsByStringAttribute(String attrValue, String masterAttrName, SortSpecification sort) throws IfsException
attrValue - the value being searched formasterAttrName - the string attributesort - the sort specificationIfsException - if the operation fails.protected long selectObjectsCountByMasterId(Long masterId, String masterAttrName) throws IfsException
masterId - the master ID valuemasterAttrName - the master attribute nameIfsException - if the operation fails.protected boolean selectObjectsExistByMasterId(Long masterId, String masterAttrName) throws IfsException
masterId - the master ID valuemasterAttrName - the master attribute nameIfsException - if the operation fails.protected S_LibraryObjectCursor selectObjectsCursorByMasterId(Long masterId, String masterAttrName, SortSpecification sort) throws IfsException
masterId - the master ID valuemasterAttrName - the master attribute namesort - the sort specificationIfsException - if the operation fails.protected S_LibraryObjectCursor selectArrayReferencingObjectsCursor(AttributeValue referencedValue, Long attributeId, SortSpecification sort) throws IfsException
Only works for object-type array attributes.
referencedValue - the value being searched forattributeId - the array attributesort - the sort specificationIfsException - if the operation fails.protected S_LibraryObjectCursor selectObjectsCursorByStringAttribute(String attrValue, String masterAttrName, SortSpecification sort) throws IfsException
attrValue - the string attribute valuemasterAttrName - the master attribute namesort - the sort specificationIfsException - if the operation fails.protected S_LibraryObjectData nextItem(S_LibraryObjectCursor cursor) throws IfsException
cursor - the cursorIfsException - if the operation fails.protected long getCountFromResultSet(ResultSet rset) throws IfsException
rset - the ResultSetIfsException - if the operation fails.protected void closeCursor(S_LibraryObjectCursor cursor)
cursor - the cursor to close.protected String getStatementSuffix() throws IfsException
IfsException - if the operation fails.protected final String generateStatementName(String classname, String stmtSuffix) throws IfsException
classname - the class namestmtSuffix - the statement suffixIfsException - if the operation fails.protected final String generateStatementName(String classname, String relname, String stmtSuffix) throws IfsException
classname - the class namerelname - the relation name; null if not applicablestmtSuffix - the statement suffixIfsException - if the operation fails.protected final String generateStatementName(String classname, SortSpecification sort, String stmtSuffix) throws IfsException
classname - the class namesort - the sort specification; can be nullstmtSuffix - the statement suffixIfsException - if the operation fails.protected final String generateStatementName(String classname, String relname, SortSpecification sort, String stmtSuffix) throws IfsException
classname - the class namerelname - the relation name; null if not applicablesort - the sort specification; can be nullstmtSuffix - the statement suffixIfsException - if the operation fails.Copyright © 2025. All rights reserved.