use of io.jans.orm.sql.model.TableMapping in project jans by JanssenProject.
the class SqlOperationServiceImpl method lookup.
@Override
public List<AttributeData> lookup(String key, String objectClass, String... attributes) throws SearchException, EntryConvertationException {
Instant startTime = OperationDurationUtil.instance().now();
TableMapping tableMapping = connectionProvider.getTableMappingByKey(key, objectClass);
List<AttributeData> result = lookupImpl(tableMapping, key, attributes);
Duration duration = OperationDurationUtil.instance().duration(startTime);
OperationDurationUtil.instance().logDebug("SQL operation: lookup, duration: {}, table: {}, key: {}, attributes: {}", duration, tableMapping.getTableName(), key, attributes);
return result;
}
use of io.jans.orm.sql.model.TableMapping in project jans by JanssenProject.
the class SqlOperationServiceImpl method deleteRecursively.
@Override
public boolean deleteRecursively(String key, String objectClass) throws EntryNotFoundException, SearchException {
Instant startTime = OperationDurationUtil.instance().now();
TableMapping tableMapping = connectionProvider.getTableMappingByKey(key, objectClass);
boolean result = deleteRecursivelyImpl(tableMapping, key);
Duration duration = OperationDurationUtil.instance().duration(startTime);
OperationDurationUtil.instance().logDebug("SQL operation: delete_tree, duration: {}, table: {}, key: {}", duration, tableMapping.getTableName(), key);
return result;
}
use of io.jans.orm.sql.model.TableMapping in project jans by JanssenProject.
the class SqlOperationServiceImpl method delete.
@Override
public long delete(String key, String objectClass, ConvertedExpression expression, int count) throws DeleteException {
Instant startTime = OperationDurationUtil.instance().now();
TableMapping tableMapping = connectionProvider.getTableMappingByKey(key, objectClass);
long result = deleteImpl(tableMapping, expression, count);
Duration duration = OperationDurationUtil.instance().duration(startTime);
OperationDurationUtil.instance().logDebug("SQL operation: delete_search, duration: {}, table: {}, key: {}, expression: {}, count: {}", duration, tableMapping.getTableName(), key, expression, count);
return result;
}
use of io.jans.orm.sql.model.TableMapping in project jans by JanssenProject.
the class SqlOperationServiceImpl method addEntry.
@Override
public boolean addEntry(String key, String objectClass, Collection<AttributeData> attributes) throws DuplicateEntryException, PersistenceException {
Instant startTime = OperationDurationUtil.instance().now();
TableMapping tableMapping = connectionProvider.getTableMappingByKey(key, objectClass);
boolean result = addEntryImpl(tableMapping, key, attributes);
Duration duration = OperationDurationUtil.instance().duration(startTime);
OperationDurationUtil.instance().logDebug("SQL operation: add, duration: {}, table: {}, key: {}, attributes: {}", duration, tableMapping.getTableName(), key, attributes);
return result;
}
use of io.jans.orm.sql.model.TableMapping in project jans by JanssenProject.
the class SqlOperationServiceImpl method search.
@Override
public <O> PagedResult<EntryData> search(String key, String objectClass, ConvertedExpression expression, SearchScope scope, String[] attributes, OrderSpecifier<?>[] orderBy, SqlBatchOperationWraper<O> batchOperationWraper, SearchReturnDataType returnDataType, int start, int count, int pageSize) throws SearchException {
Instant startTime = OperationDurationUtil.instance().now();
TableMapping tableMapping = connectionProvider.getTableMappingByKey(key, objectClass);
PagedResult<EntryData> result = searchImpl(tableMapping, key, expression, scope, attributes, orderBy, batchOperationWraper, returnDataType, start, count, pageSize);
Duration duration = OperationDurationUtil.instance().duration(startTime);
OperationDurationUtil.instance().logDebug("SQL operation: search, duration: {}, table: {}, key: {}, expression: {}, scope: {}, attributes: {}, orderBy: {}, batchOperationWraper: {}, returnDataType: {}, start: {}, count: {}, pageSize: {}", duration, tableMapping.getTableName(), key, expression, scope, attributes, orderBy, batchOperationWraper, returnDataType, start, count, pageSize);
return result;
}
Aggregations