Package com.avoka.fc.core.dao
Class MetadataTagDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.MetadataTagDao
-
public class MetadataTagDao extends AbstractDao
Provides a DAO for the MetadataTag entity.- See Also:
MetadataTag
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description MetadataTagDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetadataTag
createMetadataTag()
Create a metadata tag and register it with the data contextMetadataTag
getMetadataTag(String tagId)
Return the metadata tag with the specified OIDList<MetadataTag>
getMetadataTagList(String clientId, String keyword, String scope)
Return the list of metadata tags matching the specified search criteria, sorted by nameList<MetadataTag>
getMetadataTagListForClient(Client client)
Return the list of metadata tags who are associated with a specific client, sorted by name (global metadata tags are not included)List<MetadataTag>
getRequiredMetadataTagListForClient(Client client)
Return the list of required metadata tags who are associated with a specific client as well as global tags, sorted by nameMetadataTag
getTagByName(String name, Client client)
Return the metadata tag for the specified name and clientorg.apache.cayenne.query.SelectQuery
getTagQueryForClient(String scope, String clientOid)
Return a query that will return metadata tags assignable to a client and belonging to a certain scope (client, form).boolean
hasMetadataTags(Client client)
Return true if the client has metadata tags.-
Methods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
-
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
-
-
-
Method Detail
-
getMetadataTag
public MetadataTag getMetadataTag(String tagId)
Return the metadata tag with the specified OID- Parameters:
tagId
- the OID- Returns:
- the matching metadata tag, or null if not found
-
createMetadataTag
public MetadataTag createMetadataTag()
Create a metadata tag and register it with the data context- Returns:
- the new metadata tag
-
getMetadataTagList
public List<MetadataTag> getMetadataTagList(String clientId, String keyword, String scope)
Return the list of metadata tags matching the specified search criteria, sorted by name- Parameters:
clientId
- the OID of the client associated with the metadata tag (optional); note that global metadata tags are always includedkeyword
- the search keywordscope
- the the metadata scope (optional)- Returns:
- the list of matching metadata tags
-
hasMetadataTags
public boolean hasMetadataTags(Client client)
Return true if the client has metadata tags.- Parameters:
client
- the client organization- Returns:
- true if the client has tags
- Since:
- 5.1.4
-
getMetadataTagListForClient
public List<MetadataTag> getMetadataTagListForClient(Client client)
Return the list of metadata tags who are associated with a specific client, sorted by name (global metadata tags are not included)- Parameters:
client
- the client- Returns:
- the list of metadata tags
-
getRequiredMetadataTagListForClient
public List<MetadataTag> getRequiredMetadataTagListForClient(Client client)
Return the list of required metadata tags who are associated with a specific client as well as global tags, sorted by name- Parameters:
client
- the client (optional)- Returns:
- the list of required metadata tags
-
getTagByName
public MetadataTag getTagByName(String name, Client client)
Return the metadata tag for the specified name and client- Parameters:
name
- the tag nameclient
- the client, or null if looking for a global tag- Returns:
- the matching tag, if one exists
-
getTagQueryForClient
public org.apache.cayenne.query.SelectQuery getTagQueryForClient(String scope, String clientOid)
Return a query that will return metadata tags assignable to a client and belonging to a certain scope (client, form). If no client is specified, only global metadata tags are returned.- Parameters:
scope
- the scope (optional)clientOid
- the OID of the client (optional)- Returns:
- a
SelectQuery
-
-