public class OdsQueryHelper
extends java.lang.Object
Constructor and Description |
---|
OdsQueryHelper() |
Modifier and Type | Method and Description |
---|---|
static QueryStructureExt |
createQueryStructure(ApplicationElement aeObj,
T_LONGLONG aeId,
java.lang.String[] anuNames,
NameValueUnit[] nvus)
Create a query structure to get attributes the instances of the given application element
that match the given values.
|
static QueryStructureExt |
createQueryStructure(ApplicationElement aeObj,
T_LONGLONG aeId,
java.lang.String[] anuNames,
NameValueUnit[] nvus,
boolean lastOne)
Create a query structure to get attributes the instances of the given application element
that match the given values.
|
static QueryStructureExt |
createQueryStructure(ApplicationElement aeObj,
T_LONGLONG aeId,
java.lang.String[] anuNames,
NameValueUnit[] nvus,
boolean lastOne,
java.lang.String relName,
T_LONGLONG relId)
Create a query structure to get attributes the instances of the given application element
that match the given values.
|
static T_LONGLONG[] |
getIds(ApplElemAccess aea,
ApplicationElement ae)
Return the list of the Id from all instances of the application element
|
static T_LONGLONG[] |
getIds(ApplElemAccess applAccess,
ApplicationElement aeObj,
T_LONGLONG aeId,
java.lang.String idAttr,
NameValueUnit[] nvus)
Get the ids of the instances derived from the given application element
that match the given values.
|
static T_LONGLONG[] |
getIds(ApplElemAccess aea,
T_LONGLONG aid,
java.lang.String aaIdName)
Return the list of the Id from all instances of the application element
|
static T_LONGLONG[] |
getIds(ElemResultSet[] res,
T_LONGLONG aid,
java.lang.String aaIdName)
Return the list of the Id attributes of the Element Result Set.
|
static T_LONGLONG[] |
getIds(ElemResultSetExt[] res,
T_LONGLONG aid,
java.lang.String aaIdName)
Return the list of the Id attributes of the Element Result Set.
|
static T_LONGLONG[] |
getIdsAscending(ApplElemAccess aea,
T_LONGLONG aid,
java.lang.String aaIdName)
Return the list of the Id from all instances of the application element
|
static T_LONGLONG |
getLastId(ApplElemAccess applAccess,
ApplicationElement aeObj,
T_LONGLONG aeId,
java.lang.String idAttr,
NameValueUnit[] nvus)
Get the maximum of the ids of the instances derived from the given application element
that match the given values.
|
static T_LONGLONG |
getLastId(ApplElemAccess applAccess,
ApplicationElement aeObj,
T_LONGLONG aeId,
java.lang.String idAttr,
NameValueUnit[] nvus,
java.lang.String relName,
T_LONGLONG relId)
Get the maximum of the ids of the instances derived from the given application element
that match the given values.
|
public static T_LONGLONG getLastId(ApplElemAccess applAccess, ApplicationElement aeObj, T_LONGLONG aeId, java.lang.String idAttr, NameValueUnit[] nvus) throws AoException
applAccess
- The application access element for query.aeObj
- The ApplicationElement.aeId
- the application element id (may be null).idAttr
- Name name of the attribute of the base type id (may be null).nvus
- the values.AoException
- if an ASAM ODS call fails.public static T_LONGLONG getLastId(ApplElemAccess applAccess, ApplicationElement aeObj, T_LONGLONG aeId, java.lang.String idAttr, NameValueUnit[] nvus, java.lang.String relName, T_LONGLONG relId) throws AoException
applAccess
- The application access element for query.aeObj
- The ApplicationElement.aeId
- the application element id (may be null).idAttr
- Name name of the attribute of the base type id (may be null).nvus
- the values.relName
- The name of the relation namerelId
- the id of the related instance element.AoException
- if an ASAM ODS call fails.public static T_LONGLONG[] getIds(ApplElemAccess applAccess, ApplicationElement aeObj, T_LONGLONG aeId, java.lang.String idAttr, NameValueUnit[] nvus) throws AoException
applAccess
- The application access element for query.aeObj
- The ApplicationElement.aeId
- the application element id (may be null).idAttr
- Name name of the attribute of the base type id (may be null).nvus
- the values.AoException
- if an ASAM ODS call fails.public static T_LONGLONG[] getIds(ApplElemAccess aea, ApplicationElement ae) throws AoException
aea
- the access to the server.ae
- the application element which Ids will be returnedAoException
public static T_LONGLONG[] getIds(ApplElemAccess aea, T_LONGLONG aid, java.lang.String aaIdName) throws AoException
aea
- the access to the server.aid
- Id of the application element.aaIdName
- the attribute name of the Id.AoException
public static T_LONGLONG[] getIdsAscending(ApplElemAccess aea, T_LONGLONG aid, java.lang.String aaIdName) throws AoException
aea
- the access to the server.aid
- Id of the application element.aaIdName
- the attribute name of the Id.AoException
public static T_LONGLONG[] getIds(ElemResultSet[] res, T_LONGLONG aid, java.lang.String aaIdName) throws AoException
res
- the element result set.aid
- the application element Id which Ids will be returnedaaIdName
- the name of the Id attribute.AoException
public static T_LONGLONG[] getIds(ElemResultSetExt[] res, T_LONGLONG aid, java.lang.String aaIdName) throws AoException
res
- the element result set.aid
- the application element Id which Ids will be returnedaaIdName
- the name of the Id attribute.AoException
public static QueryStructureExt createQueryStructure(ApplicationElement aeObj, T_LONGLONG aeId, java.lang.String[] anuNames, NameValueUnit[] nvus) throws AoException
aeObj
- The ApplicationElement.aeId
- the application element id (may be null).anuNames
- the names of the attributes to listed.nvus
- the values.AoException
- if an ASAM ODS call fails.public static QueryStructureExt createQueryStructure(ApplicationElement aeObj, T_LONGLONG aeId, java.lang.String[] anuNames, NameValueUnit[] nvus, boolean lastOne) throws AoException
aeObj
- The ApplicationElement.aeId
- the application element id (may be null).anuNames
- the names of the attributes to listed.nvus
- the values.lastOne
- request the last one (highest ID) of the existing elements (works if the is an element of the anuNames only).AoException
- if an ASAM ODS call fails.public static QueryStructureExt createQueryStructure(ApplicationElement aeObj, T_LONGLONG aeId, java.lang.String[] anuNames, NameValueUnit[] nvus, boolean lastOne, java.lang.String relName, T_LONGLONG relId) throws AoException
aeObj
- The ApplicationElement.aeId
- the application element id (may be null).anuNames
- the names of the attributes to listed.nvus
- the values.lastOne
- request the last one (highest ID) of the existing elements (works if the is an element of the anuNames only).relname
- the name of the relation attribute to be considered for the query.relId
- The related instance element id, blong to the relname.AoException
- if an ASAM ODS call fails.