de.uplanet.lucy.server.usermanager.ds
Class DsClass

java.lang.Object
  extended by de.uplanet.lucy.server.usermanager.ds.DsClass
All Implemented Interfaces:
de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper

public class DsClass
extends java.lang.Object
implements de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper

Information class for a ds class object

Version:
$Revision: 87649 $

Method Summary
 java.util.List<de.uplanet.lucy.server.usermanager.ds.DsAttribute> getAllAttributes()
          all attributes with the parent class attributes
 java.util.Set<java.lang.String> getAllAttributesGuids()
           
 de.uplanet.lucy.server.usermanager.ds.DsAttribute getAttributeByGuid(java.lang.String p_strGUID)
           
 de.uplanet.lucy.server.usermanager.ds.DsAttribute getAttributeByName(java.lang.String p_strName)
           
 java.util.Map<java.lang.String,de.uplanet.lucy.server.usermanager.ds.DsAttribute> getAttributes()
          returns all attribute without the parent attributes
 java.util.List<java.lang.String> getCustomAttributeGuids()
          a list of guids, for the custom attributes in dsattr (bmandatory = false=
 de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(java.lang.String p_strGUID)
           
 de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(java.lang.String p_strGUID, java.util.Map<java.lang.String,DsClass> p_tblAliasToClassMap)
           
 de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByName(java.lang.String p_strName)
           
 java.util.Set<java.lang.Integer> getDerivedTypes()
           
 int getID()
           
 java.util.Map<java.lang.String,java.lang.String> getLocalizedNameMap(de.uplanet.jdbc.JdbcConnection p_conn)
           
 java.lang.String getName()
           
 java.lang.String getNameDecriptionSelect()
           
 int getOrder()
           
 DsClass getParent()
           
 de.uplanet.lucy.server.usermanager.ds.DsAttribute getPkAttribute()
           
 java.util.List<java.lang.String> getRequiredAttributes()
           
 java.util.Set<java.lang.String> getSearchableAttributeGuids()
          returns all attibutes guids which the BSEARCHABLE column is true and is a string type
 void getSelectCountStatement(java.lang.StringBuilder p_sql)
          generates the select count(*) from tbls with the needed join.
 void getSelectCountStatement(java.lang.StringBuilder p_sql, java.util.List<java.lang.String> p_whereTbls)
          generates the select count(*) from tbls with the needed join.
 de.uplanet.lucy.server.usermanager.ds.IDsSelectWorker getSelectStatement(java.lang.StringBuilder p_sql, java.lang.String[] p_fields, boolean p_bDistinct, java.util.List<java.lang.String> p_whereTables)
           
 java.lang.String getSqlSelectStatement(java.util.Map<java.lang.String,java.lang.String> p_fieldAliases, java.lang.String... p_selectFields)
          generates the sql statement, first field will always the pk key
 java.lang.String getSqlSelectStatement(java.lang.String... p_selectfieldGuids)
           
 java.lang.String getTablename()
           
 de.uplanet.lucy.server.usermanager.IDsType getType()
           
 de.uplanet.lucy.server.usermanager.ds.IDsUpdInsWorker getUpdateInsertStatement(boolean p_bInsert, IDsRecord p_record)
           
 boolean hasAttribute(java.lang.String p_strAttributeGuid)
           
 boolean isContainer(DsClass p_class)
           
 boolean isMandatory()
           
 void resetLocalizedCache()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isContainer

public boolean isContainer(DsClass p_class)
Parameters:
p_class -
Returns:
True if class is an container or depends to a container class

getID

public int getID()
Returns:
the iD

getName

public java.lang.String getName()
Returns:
the name

getTablename

public java.lang.String getTablename()
Returns:
the tablename

getParent

public DsClass getParent()
Returns:
the parent

getAttributes

public java.util.Map<java.lang.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(java.lang.StringBuilder p_sql,
                                                                                java.lang.String[] p_fields,
                                                                                boolean p_bDistinct,
                                                                                java.util.List<java.lang.String> p_whereTables)
Parameters:
p_sql - The sql string
p_fields - The fields
p_bDistinct - distinct select
p_whereTables - The where tables
Returns:
The selectins worker

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

public java.util.List<java.lang.String> getRequiredAttributes()
Returns:
the requiredAttributes

getPkAttribute

public de.uplanet.lucy.server.usermanager.ds.DsAttribute getPkAttribute()
Returns:
the pkAttribuite

getNameDecriptionSelect

public java.lang.String getNameDecriptionSelect()
Returns:
Select satement

getSqlSelectStatement

public java.lang.String getSqlSelectStatement(java.util.Map<java.lang.String,java.lang.String> p_fieldAliases,
                                              java.lang.String... p_selectFields)
generates the sql statement, first field will always the pk key

Parameters:
p_fieldAliases - Table Aliases to DsClass
p_selectFields - Name = FieldGuid, Value used when Field not found
Returns:
sql statement

getSqlSelectStatement

public java.lang.String getSqlSelectStatement(java.lang.String... p_selectfieldGuids)
Parameters:
p_selectfieldGuids - Field guids to select
Returns:
the sql statemennt

getAllAttributesGuids

public java.util.Set<java.lang.String> getAllAttributesGuids()
Returns:
all attribute guids, with the parent class guids

getAllAttributes

public java.util.List<de.uplanet.lucy.server.usermanager.ds.DsAttribute> getAllAttributes()
all attributes with the parent class attributes

Returns:
list of DsAttribute items

getSelectCountStatement

public void getSelectCountStatement(java.lang.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(java.lang.StringBuilder p_sql,
                                    java.util.List<java.lang.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 java.util.Set<java.lang.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 java.util.List<java.lang.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

getDerivedTypes

public java.util.Set<java.lang.Integer> getDerivedTypes()
Returns:
The derived class type ids.

hasAttribute

public boolean hasAttribute(java.lang.String p_strAttributeGuid)
Parameters:
p_strAttributeGuid - The attribute guid
Returns:
true if a attribute with the guid exists.

getLocalizedNameMap

public java.util.Map<java.lang.String,java.lang.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(java.lang.String p_strName)
Parameters:
p_strName - The column name
Returns:
The column field with the guid or null if not found.

getDbColumnByGuid

public de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(java.lang.String p_strGUID,
                                                                        java.util.Map<java.lang.String,DsClass> p_tblAliasToClassMap)
Specified by:
getDbColumnByGuid in interface de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper

getDbColumnByGuid

public de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(java.lang.String p_strGUID)
Specified by:
getDbColumnByGuid in interface de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper

getAttributeByName

public de.uplanet.lucy.server.usermanager.ds.DsAttribute getAttributeByName(java.lang.String p_strName)
Parameters:
p_strName - The attribute name
Returns:
The attribute with the given name or null if not found

getAttributeByGuid

public de.uplanet.lucy.server.usermanager.ds.DsAttribute getAttributeByGuid(java.lang.String p_strGUID)
Parameters:
p_strGUID - The attribute guid
Returns:
The attribute with the given guid or null if not found.


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.