Interface IDsDbManager<RECORDCLASS extends IDsRecord>
- All Superinterfaces:
de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
public interface IDsDbManager<RECORDCLASS extends IDsRecord>
extends de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(int p_iPrimaryKeyValue) Marks the class object given by the p_iPrimaryKey value as deleted if that record is marked as not deletable an Runtime exception will be thrownde.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
de.uplanet.jdbc.JdbcConnection
de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
de.uplanet.lucy.server.usermanager.ds.DbColumn
getDbColumnByGuid
(String p_strGUID) Returns an DbColumn Object for the class attribute given by the GUID.de.uplanet.lucy.server.usermanager.ds.DbColumn
getDbColumnByGuid
(String p_strGUID, Map<String, DsClass> p_tblAliasToClassMap) Returns an DbColumn Object for the class attribute given by the parameter p_strGuidint
Inserts an new record object.select
(de.uplanet.lucy.server.businesslogic.user.jdbc.IDsFilterSelect p_selectFilter) select
(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows, IDsSelectIterator p_iterator, boolean p_bDistinct, String... p_selectfieldGuids) select
(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows, IDsSelectIterator p_iterator, String... p_selectfieldGuids) select
(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows, String... p_selectfieldGuids) Select an list of records.select
(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, String... p_selectfieldGuids) Select an list of records.selectByGuid
(String p_strGuid, String... p_selectFieldGuids) Returns one record coresponding to the given guid.selectByPrimaryKey
(int p_iPrimaryKeyValue, String... p_selectFieldGuids) Returns one record coresponding to the given primary key.selectByPrimaryKey
(int p_iPrimaryKeyValue, Collection<String> p_selectFieldGuids) Returns one record coresponding to the given primary key.int
selectCount
(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter) Returns the count of records found in the classselectFullByGuid
(String p_strGuid) Returns one record, that is full read.selectFullByPrimaryKey
(int p_iPrimaryKeyValue) Returns one record, that is full read.selectFullRecord
(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter, IDsOrder[] p_orderFields) Returns a full list of records (all fields (Attributes) in the record will be set, like select * from)selectFullRecord
(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows) Returns a full list of records.selectIterate
(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, IDsSelectIterator p_iterator, String... p_selectfieldGuids) void
setCustomAttributeHelper
(de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper p_helper) int
Udates a user manager object.
-
Method Details
-
getLastSqlStmt
String getLastSqlStmt() -
getConnection
de.uplanet.jdbc.JdbcConnection getConnection()- Returns:
- the jdbc conntection
-
getClassName
String getClassName()- Returns:
- the class name (the STRNAME column in DSCLASS)
-
getClassDef
DsClass getClassDef()- Returns:
- the class definition, see
DsClass
-
selectFullRecord
List<RECORDCLASS> selectFullRecord(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter, IDsOrder[] p_orderFields) throws SQLException Returns a full list of records (all fields (Attributes) in the record will be set, like select * from)- Parameters:
p_whereFilter
- can be null, used to set an filter for the select statementp_orderFields
- can be null, used to set an order to the select statement- Returns:
- a list of records, or null when no record found
- Throws:
SQLException
-
selectFullRecord
List<RECORDCLASS> selectFullRecord(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows) throws SQLException Returns a full list of records. In the record all fields will be set.- Parameters:
p_whereFilter
- can be null, used to set an filter for the select statementp_orderFields
- can be null, used to set an order to the select statementp_iFirstRow
- used for pageing, the starting rowp_iRows
- the maximal count of records or -1 for all- Returns:
- a list of records, or empty list when no record found
- Throws:
SQLException
-
selectCount
Returns the count of records found in the class- Parameters:
p_whereFilter
-- Returns:
- count of records found in class
- Throws:
SQLException
-
selectFullByPrimaryKey
Returns one record, that is full read. or null when no record found by the given primary key.- Parameters:
p_iPrimaryKeyValue
-- Returns:
- record with all fields, or
null
when no record found - Throws:
SQLException
-
selectFullByGuid
Returns one record, that is full read. or null when no record found by the given guid.- Parameters:
p_strGuid
-- Returns:
- record with all fields or
null
when not found - Throws:
SQLException
-
selectByGuid
Returns one record coresponding to the given guid. (At least the primary key field is set in the record object)- Parameters:
p_strGuid
- the guidp_selectFieldGuids
- The fields, which will read from the db and will be set in the record object- Returns:
null
if no record found, or an record object filled with the fields (+ primary key) given by the l_selctFieldGuids- Throws:
SQLException
-
selectByPrimaryKey
RECORDCLASS selectByPrimaryKey(int p_iPrimaryKeyValue, String... p_selectFieldGuids) throws SQLException Returns one record coresponding to the given primary key. (At least the primary key field is set in the record object)- Parameters:
p_iPrimaryKeyValue
- the primary keyp_selectFieldGuids
- The fields, which will read from the db and will be set in the record object- Returns:
null
if no record found, or an record object filled with the fields (+ primary key) given by the l_selectFieldGuids or throws aDsRuntimeException
if a record with a bad type is readed- Throws:
SQLException
-
selectByPrimaryKey
RECORDCLASS selectByPrimaryKey(int p_iPrimaryKeyValue, Collection<String> p_selectFieldGuids) throws SQLException Returns one record coresponding to the given primary key. (At least the primary key field is set in the record object)- Parameters:
p_iPrimaryKeyValue
- the primary keyp_selectFieldGuids
- The fields, which will read from the db and will be set in the record object- Returns:
null
if no record found, or an record object filled with the fields (+ primary key) given by the l_selectFieldGuids or throws aDsRuntimeException
if a record with a bad type is readed- Throws:
SQLException
-
select
List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, String... p_selectfieldGuids) throws SQLException Select an list of records. At least the primary key fields is set in the record object. Other fields only set when given in p_selectFieldGuids paramter.- Parameters:
p_where
- used for the where clauseIDsFilter
(can be null)p_orderFields
- used for the order by clause. (can be null)p_selectfieldGuids
- field guids depends on the STRGUID field in DSATTR (at least one element)- Returns:
- list of records or an empty list if no records was found.
or throws a
DsRuntimeException
if a record with a bad type is readed - Throws:
SQLException
-
selectIterate
RECORDCLASS selectIterate(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, IDsSelectIterator p_iterator, String... p_selectfieldGuids) throws SQLException - Parameters:
p_where
- the where clause (can be null)p_orderFields
- the sort fields (can be null)p_iterator
- the iterator called, to select the records (must not be null)p_selectfieldGuids
- field guids depends on the STRGUID field in DSATTR (at least one element)- Returns:
- null or a record
or throws a
DsRuntimeException
if a record with a bad type is readed - Throws:
SQLException
-
select
List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows, String... p_selectfieldGuids) throws SQLException Select an list of records. At least the primary key fields is set in the record object. Other fields only set when given in p_selectFieldGuids parameter. (can used for pageing)- Parameters:
p_where
- used for the where clauseIDsFilter
(can be null)p_orderFields
- used for the order by clause. (can be null)p_iFirstRow
- start row index or <= 0 for first row startp_iRows
- maximal count of rows return , or -1 for all rows shoudl returnedp_selectfieldGuids
- field guids depends on the STRGUID field in DSATTR (at least one element)- Returns:
- empty list, if no record was found otherwise a list of readed records
or throws a
DsRuntimeException
if a record with a bad type is readed - Throws:
SQLException
-
select
List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows, IDsSelectIterator p_iterator, String... p_selectfieldGuids) throws SQLException - Parameters:
p_where
- can be nullp_orderFields
- can be nullp_iFirstRow
- <= 0 starts at begin (used for pageing)p_iRows
- -1 for all, otherwise the maximal read countp_iterator
- can be null, can be used to check if an record should added to the return List or to end the readingp_selectfieldGuids
-- Returns:
- empty list if no records was found otherwise a list of records
or throws a
DsRuntimeException
if a record with a bad type is readed - Throws:
SQLException
-
select
List<RECORDCLASS> select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, int p_iFirstRow, int p_iRows, IDsSelectIterator p_iterator, boolean p_bDistinct, String... p_selectfieldGuids) throws SQLException - Parameters:
p_where
- can be nullp_orderFields
- can be nullp_iFirstRow
- <= 0 starts at begin (used for pageing)p_iRows
- -1 for all, otherwise the maximal read countp_iterator
- can be null, can be used to check if an record should added to the return List or to end the readingp_bDistinct
- Distinct select?p_selectfieldGuids
-- Returns:
- empty list if no records was found otherwise a list of records
or throws a
DsRuntimeException
if a record with a bad type is readed - Throws:
SQLException
-
select
List<RECORDCLASS> select(de.uplanet.lucy.server.businesslogic.user.jdbc.IDsFilterSelect p_selectFilter) throws SQLException - Throws:
SQLException
-
update
Udates a user manager object. (the PK field value is readonly)- Parameters:
p_pkValue
- The primary keyp_updateRecord
- The update record- Returns:
- update count
- Throws:
SQLException
-
insert
Inserts an new record object. If an record with the same name, classid, containerid and bdeleted = true exists this record will be updated with the given p_insertRecord otherwise the p_insertRecord is inserted if no primary key value is set in the p_insertRecord, a new primary key value will be generated- Parameters:
p_insertRecord
- not nullable (on null an IllegalArgumentException will be thrown)- Returns:
- the generated pk Key value or
0
if the insert fails - Throws:
SQLException
-
delete
Marks the class object given by the p_iPrimaryKey value as deleted if that record is marked as not deletable an Runtime exception will be thrown- Parameters:
p_iPrimaryKeyValue
-- Throws:
SQLException
RuntimeException
-
getDbColumnByGuid
Returns an DbColumn Object for the class attribute given by the GUID.- Specified by:
getDbColumnByGuid
in interfacede.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
- Parameters:
p_strGUID
- may not be null- Returns:
DbColumn
-
getDbColumnByGuid
de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(String p_strGUID, Map<String, DsClass> p_tblAliasToClassMap) Returns an DbColumn Object for the class attribute given by the parameter p_strGuid- Specified by:
getDbColumnByGuid
in interfacede.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
- Parameters:
p_strGUID
- TheColumn
guid (must not benull
)p_tblAliasToClassMap
- saves the table mapping (the table alias to the correspondig class definition)- Returns:
DbColumn
-
setCustomAttributeHelper
void setCustomAttributeHelper(de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper p_helper) - Parameters:
p_helper
- Helper for custom fields.
-
getCustomAttributeHelper
de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper getCustomAttributeHelper()- Returns:
- The custom attribute helper
-
getAttributeHelper
de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper getAttributeHelper()- Returns:
- The attribute helper
-