Class DsClass
java.lang.Object
de.uplanet.lucy.server.usermanager.ds.DsClass
- All Implemented Interfaces:
de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
public final class DsClass
extends Object
implements de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
Information class for a ds class object
-
Method Summary
Modifier and TypeMethodDescriptionList<de.uplanet.lucy.server.usermanager.ds.DsAttribute> all attributes with the parent class attributesde.uplanet.lucy.server.usermanager.ds.DsAttributegetAttributeByGuid(String p_strGUID) de.uplanet.lucy.server.usermanager.ds.DsAttributegetAttributeByName(String p_strName) de.uplanet.lucy.server.usermanager.ds.DsAttributegetAttributeByUserAppFieldGuid(String p_strFieldGUID) returns all attribute without the parent attributesa list of guids, for the custom attributes in dsattr (bmandatory = false=de.uplanet.lucy.server.usermanager.ds.DbColumngetDbColumnByGuid(String p_strGUID) de.uplanet.lucy.server.usermanager.ds.DbColumngetDbColumnByGuid(String p_strGUID, Map<String, DsClass> p_tblAliasToClassMap) de.uplanet.lucy.server.usermanager.ds.DbColumngetDbColumnByName(String p_strName) getGuid()intgetID()getLocalizedNameMap(de.uplanet.jdbc.JdbcConnection p_conn) getName()final intgetOrder()de.uplanet.lucy.server.usermanager.ds.DsAttributereturns all attibutes guids which the BSEARCHABLE column is true and is a string typevoidgenerates the select count(*) from tbls with the needed join.voidgetSelectCountStatement(StringBuilder p_sql, List<String> p_whereTbls) generates the select count(*) from tbls with the needed join.de.uplanet.lucy.server.usermanager.ds.IDsSelectWorkergetSelectStatement(StringBuilder p_sql, String[] p_fields, boolean p_bDistinct, List<String> p_whereTables) getSqlSelectStatement(String... p_selectfieldGuids) getSqlSelectStatement(Map<String, String> p_fieldAliases, String... p_selectFields) generates the sql statement, first field will always the pk keyList<de.uplanet.lucy.server.usermanager.ds.DsAttribute> getTenantAttributes(boolean p_bParentAttributes) Get tenant attributesfinal de.uplanet.lucy.server.usermanager.IDsTypegetType()de.uplanet.lucy.server.usermanager.ds.IDsUpdInsWorkergetUpdateInsertStatement(boolean p_bInsert, IDsRecord p_record) de.uplanet.lucy.server.usermanager.ds.IDsSelectWorkerbooleanhasAttribute(String p_strAttributeGuid) booleanfinal booleanvoid
-
Method Details
-
isContainer
public boolean isContainer()- Returns:
- True if class is an container or depends to a container class
-
getID
public int getID()- Returns:
- the iD
-
getGuid
- Returns:
- the guid
-
getName
- Returns:
- the name
-
getTablename
- Returns:
- the tablename
-
getParent
- Returns:
- the parent
-
getAttributes
returns all attribute without the parent attributes- Returns:
- the p_attribute
-
getSelectStatement
public de.uplanet.lucy.server.usermanager.ds.IDsSelectWorker getSelectStatement(StringBuilder p_sql, String[] p_fields, boolean p_bDistinct, List<String> p_whereTables) - Parameters:
p_sql- The sql stringp_fields- The fieldsp_bDistinct- distinct selectp_whereTables- The where tables- Returns:
- The selectins worker
-
getWorker
-
getUpdateInsertStatement
public de.uplanet.lucy.server.usermanager.ds.IDsUpdInsWorker getUpdateInsertStatement(boolean p_bInsert, IDsRecord p_record) - Parameters:
p_bInsert- Insert record?p_record- The record to insert or update- Returns:
- The insert / update worker
-
getRequiredAttributes
- Returns:
- the requiredAttributes
-
getPkAttribute
public de.uplanet.lucy.server.usermanager.ds.DsAttribute getPkAttribute()- Returns:
- the pkAttribuite
-
getNameDescriptionSelect
- Returns:
- Select statement
-
getSqlSelectStatement
generates the sql statement, first field will always the pk key- Parameters:
p_fieldAliases- Table Aliases to DsClassp_selectFields- Name = FieldGuid, Value used when Field not found- Returns:
- sql statement
-
getSqlSelectStatement
- Parameters:
p_selectfieldGuids- Field guids to select- Returns:
- the sql statemennt
-
getAllAttributesGuids
- Returns:
- all attribute guids, with the parent class guids
-
getAllAttributes
all attributes with the parent class attributes- Returns:
- list of
DsAttributeitems
-
getSelectCountStatement
generates the select count(*) from tbls with the needed join. no where clause is generated here. and no special joins to the dsmember or to dsobject for the containerguid is generated here.- Parameters:
p_sql- StringBuilder to store the generated sql statement
-
getSelectCountStatement
generates the select count(*) from tbls with the needed join. no where clause is generated here. and no special joins to the dsmember or to dsobject for the containerguid is generated here.- Parameters:
p_sql- StringBuilder to store the generated sql statement
-
getSearchableAttributeGuids
returns all attibutes guids which the BSEARCHABLE column is true and is a string type- Returns:
- list of searchable fields (DsObject.STRNAME is allways in the result set)
-
getCustomAttributeGuids
a list of guids, for the custom attributes in dsattr (bmandatory = false=- Returns:
- unmodifieable list
-
getOrder
public final int getOrder()- Returns:
- the order
-
isMandatory
public final boolean isMandatory()- Returns:
- the mandatory
-
getType
public final de.uplanet.lucy.server.usermanager.IDsType getType()- Returns:
- The type @see
DsDefaultType
-
getDerivedTypes
- Returns:
- The derived class type ids.
-
hasAttribute
- Parameters:
p_strAttributeGuid- The attribute guid- Returns:
- true if a attribute with the guid exists.
-
getLocalizedNameMap
- Parameters:
p_conn- The database connection- Returns:
- Map with the localized names
-
resetLocalizedCache
public void resetLocalizedCache() -
getDbColumnByName
- Parameters:
p_strName- The column name- Returns:
- The column field with the guid or
nullif not found.
-
getDbColumnByGuid
public de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(String p_strGUID, Map<String, DsClass> p_tblAliasToClassMap) - Specified by:
getDbColumnByGuidin interfacede.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
-
getDbColumnByGuid
- Specified by:
getDbColumnByGuidin interfacede.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
-
getAttributeByName
- Parameters:
p_strName- The attribute name- Returns:
- The attribute with the given name or
nullif not found
-
getAttributeByGuid
- Parameters:
p_strGUID- The attribute guid- Returns:
- The attribute with the given guid or
nullif not found.
-
getAttributeByUserAppFieldGuid
public de.uplanet.lucy.server.usermanager.ds.DsAttribute getAttributeByUserAppFieldGuid(String p_strFieldGUID) - Parameters:
p_strFieldGUID- The attribute field guid- Returns:
- The attribute with the given guid or
nullif not found.
-
getTenantAttributes
public List<de.uplanet.lucy.server.usermanager.ds.DsAttribute> getTenantAttributes(boolean p_bParentAttributes) Get tenant attributes- Parameters:
p_bParentAttributes- True to include the tenant attributes of parent classes.- Returns:
- list of
DsAttributeitems
-