1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-05 23:22:47 +00:00

Improves character count checks

This commit is contained in:
2011-12-29 16:04:39 -02:00
parent 1f2b700311
commit 83bf11e1c1
7 changed files with 50 additions and 13 deletions

View File

@@ -1069,7 +1069,7 @@ public abstract class AbstractOrientDatabaseService extends
@Override
public boolean filter(OQueryContextNative record) {
record = query(record);
record = query(record, entity);
if (record == null)
return true;
return record.go();
@@ -1084,8 +1084,11 @@ public abstract class AbstractOrientDatabaseService extends
*
* @param record
* the document record
* @param e
* the entity
* @return the record instance or <code>null</code>
*/
protected abstract OQueryContextNative query(OQueryContextNative record);
protected abstract OQueryContextNative query(
OQueryContextNative record, E e);
}
}

View File

@@ -1094,7 +1094,7 @@ public abstract class AbstractSQLDatabaseService extends
SQLQueryFactory<? extends AbstractSQLQuery<?>, ?, ?, ?, ?, ?> factory,
DatabaseService database) {
final AbstractSQLQuery<?> count = factory.query().from(entity);
query(count);
query(count, entity);
return (int) count.count();
}
@@ -1103,7 +1103,8 @@ public abstract class AbstractSQLDatabaseService extends
*
* @param q
* the query clause
* @param e the entity
*/
protected abstract void query(AbstractSQLQuery<?> q);
protected abstract void query(AbstractSQLQuery<?> q, E e);
}
}