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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<de.uplanet.lucy.server.usermanager.ds.DsAttribute>getAllAttributes()all attributes with the parent class attributesSet<String>getAllAttributesGuids()de.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)Map<String,de.uplanet.lucy.server.usermanager.ds.DsAttribute>getAttributes()returns all attribute without the parent attributesList<String>getCustomAttributeGuids()a 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)Set<Integer>getDerivedTypes()StringgetGuid()intgetID()Map<String,String>getLocalizedNameMap(de.uplanet.jdbc.JdbcConnection p_conn)StringgetName()StringgetNameDescriptionSelect()intgetOrder()DsClassgetParent()de.uplanet.lucy.server.usermanager.ds.DsAttributegetPkAttribute()List<String>getRequiredAttributes()Set<String>getSearchableAttributeGuids()returns all attibutes guids which the BSEARCHABLE column is true and is a string typevoidgetSelectCountStatement(StringBuilder p_sql)generates 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)StringgetSqlSelectStatement(String... p_selectfieldGuids)StringgetSqlSelectStatement(Map<String,String> p_fieldAliases, String... p_selectFields)generates the sql statement, first field will always the pk keyStringgetTablename()List<de.uplanet.lucy.server.usermanager.ds.DsAttribute>getTenantAttributes(boolean p_bParentAttributes)Get tenant attributesde.uplanet.lucy.server.usermanager.IDsTypegetType()de.uplanet.lucy.server.usermanager.ds.IDsUpdInsWorkergetUpdateInsertStatement(boolean p_bInsert, IDsRecord p_record)de.uplanet.lucy.server.usermanager.ds.IDsSelectWorkergetWorker(HashMap<String,de.uplanet.lucy.types.UP_TYPE> p_attributes)booleanhasAttribute(String p_strAttributeGuid)booleanisContainer()booleanisMandatory()voidresetLocalizedCache()
-
-
-
Method Detail
-
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
public String getGuid()
- Returns:
- the guid
-
getName
public String getName()
- Returns:
- the name
-
getTablename
public String getTablename()
- Returns:
- the tablename
-
getParent
public DsClass getParent()
- Returns:
- the parent
-
getAttributes
public Map<String,de.uplanet.lucy.server.usermanager.ds.DsAttribute> 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
public de.uplanet.lucy.server.usermanager.ds.IDsSelectWorker getWorker(HashMap<String,de.uplanet.lucy.types.UP_TYPE> p_attributes)
-
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
-
getPkAttribute
public de.uplanet.lucy.server.usermanager.ds.DsAttribute getPkAttribute()
- Returns:
- the pkAttribuite
-
getNameDescriptionSelect
public String getNameDescriptionSelect()
- Returns:
- Select statement
-
getSqlSelectStatement
public String getSqlSelectStatement(Map<String,String> p_fieldAliases, String... p_selectFields)
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
public String getSqlSelectStatement(String... p_selectfieldGuids)
- Parameters:
p_selectfieldGuids- Field guids to select- Returns:
- the sql statemennt
-
getAllAttributesGuids
public Set<String> getAllAttributesGuids()
- Returns:
- all attribute guids, with the parent class guids
-
getAllAttributes
public List<de.uplanet.lucy.server.usermanager.ds.DsAttribute> getAllAttributes()
all attributes with the parent class attributes- Returns:
- list of
DsAttributeitems
-
getSelectCountStatement
public void getSelectCountStatement(StringBuilder p_sql)
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
public void getSelectCountStatement(StringBuilder p_sql, List<String> p_whereTbls)
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
public Set<String> 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
public List<String> 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
-
hasAttribute
public boolean hasAttribute(String p_strAttributeGuid)
- Parameters:
p_strAttributeGuid- The attribute guid- Returns:
- true if a attribute with the guid exists.
-
getLocalizedNameMap
public Map<String,String> getLocalizedNameMap(de.uplanet.jdbc.JdbcConnection p_conn)
- Parameters:
p_conn- The database connection- Returns:
- Map with the localized names
-
resetLocalizedCache
public void resetLocalizedCache()
-
getDbColumnByName
public de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByName(String p_strName)
- 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
public de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(String p_strGUID)
- Specified by:
getDbColumnByGuidin interfacede.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
-
getAttributeByName
public de.uplanet.lucy.server.usermanager.ds.DsAttribute getAttributeByName(String p_strName)
- Parameters:
p_strName- The attribute name- Returns:
- The attribute with the given name or
nullif not found
-
getAttributeByGuid
public de.uplanet.lucy.server.usermanager.ds.DsAttribute getAttributeByGuid(String p_strGUID)
- 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
-
-