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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
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
getAttributeHelper()
DsClass
getClassDef()
String
getClassName()
de.uplanet.jdbc.JdbcConnection
getConnection()
de.uplanet.lucy.server.usermanager.ds.IDsAttributesHelper
getCustomAttributeHelper()
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_strGuidString
getLastSqlStmt()
int
insert(IDsRecord p_insertRecord)
Inserts an new record object.List<RECORDCLASS>
select(de.uplanet.lucy.server.businesslogic.user.jdbc.IDsFilterSelect p_selectFilter)
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)
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)
List<RECORDCLASS>
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.List<RECORDCLASS>
select(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_where, IDsOrder[] p_orderFields, String... p_selectfieldGuids)
Select an list of records.RECORDCLASS
selectByGuid(String p_strGuid, String... p_selectFieldGuids)
Returns one record coresponding to the given guid.RECORDCLASS
selectByPrimaryKey(int p_iPrimaryKeyValue, String... p_selectFieldGuids)
Returns one record coresponding to the given primary key.RECORDCLASS
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 classRECORDCLASS
selectFullByGuid(String p_strGuid)
Returns one record, that is full read.RECORDCLASS
selectFullByPrimaryKey(int p_iPrimaryKeyValue)
Returns one record, that is full read.List<RECORDCLASS>
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)List<RECORDCLASS>
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.RECORDCLASS
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
update(int p_pkValue, IDsRecord p_updateRecord)
Udates a user manager object.
-
-
-
Method Detail
-
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)
-
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
int selectCount(de.uplanet.lucy.server.usermanager.ds.IDsFilter p_whereFilter) throws SQLException
Returns the count of records found in the class- Parameters:
p_whereFilter
-- Returns:
- count of records found in class
- Throws:
SQLException
-
selectFullByPrimaryKey
RECORDCLASS selectFullByPrimaryKey(int p_iPrimaryKeyValue) throws SQLException
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
RECORDCLASS selectFullByGuid(String p_strGuid) throws SQLException
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
RECORDCLASS selectByGuid(String p_strGuid, String... p_selectFieldGuids) throws SQLException
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
int update(int p_pkValue, IDsRecord p_updateRecord) throws SQLException
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
int insert(IDsRecord p_insertRecord) throws SQLException
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
void delete(int p_iPrimaryKeyValue) throws SQLException
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
de.uplanet.lucy.server.usermanager.ds.DbColumn getDbColumnByGuid(String p_strGUID)
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
-
-