Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericEntity.java Sat Apr 27 19:34:25 2019 @@ -796,6 +796,7 @@ public class GenericEntity implements Ma * @return If the corresponding resource is found and contains a key as described above, then that * property value is returned; otherwise returns the field value */ + @Override public Object get(String name, Locale locale) { return get(name, null, locale); } @@ -1431,6 +1432,7 @@ public class GenericEntity implements Ma *@param that Object to compare this to *@return int representing the result of the comparison (-1,0, or 1) */ + @Override public int compareTo(GenericEntity that) { // if null, it will push to the beginning if (that == null) { @@ -1482,52 +1484,62 @@ public class GenericEntity implements Ma return newEntity; } - // ---- Methods added to implement the Map interface: ---- - + @Override public Object remove(Object key) { return this.fields.remove(key); } + @Override public boolean containsKey(Object key) { return this.fields.containsKey(key); } + @Override public java.util.Set<Map.Entry<String, Object>> entrySet() { return Collections.unmodifiableMap(this.fields).entrySet(); } + @Override public Object put(String key, Object value) { return this.set(key, value, true); } + @Override public void putAll(java.util.Map<? extends String, ? extends Object> map) { this.setFields(map); } + @Override public void clear() { this.fields.clear(); } + @Override public Object get(Object key) { return this.get((String) key); } + @Override public java.util.Set<String> keySet() { return Collections.unmodifiableSet(this.fields.keySet()); } + @Override public boolean isEmpty() { return this.fields.isEmpty(); } + @Override public java.util.Collection<Object> values() { return Collections.unmodifiableMap(this.fields).values(); } + @Override public boolean containsValue(Object value) { return this.fields.containsValue(value); } + @Override public int size() { return this.fields.size(); } @@ -1679,6 +1691,7 @@ public class GenericEntity implements Ma return this == o; } + @Override public int compareTo(NullField other) { return equals(other) ? 0 : -1; } Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionBuilder.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionBuilder.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionBuilder.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionBuilder.java Sat Apr 27 19:34:25 2019 @@ -44,29 +44,36 @@ public class EntityConditionBuilder exte this.condition = condition; } + @Override public boolean isEmpty() { return condition.isEmpty(); } + @Override public String makeWhereString(ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, Datasource datasourceInfo) { return condition.makeWhereString(modelEntity, entityConditionParams, datasourceInfo); } + @Override public void checkCondition(ModelEntity modelEntity) throws GenericModelException { condition.checkCondition(modelEntity); } + @Override public boolean mapMatches(Delegator delegator, Map<String, ? extends Object> map) { return condition.mapMatches(delegator, map); } + @Override public EntityCondition freeze() { return condition.freeze(); } + @Override public int hashCode() { return condition.hashCode(); } + @Override public boolean equals(Object obj) { return condition.equals(obj); } Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityFunction.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityFunction.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityFunction.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityFunction.java Sat Apr 27 19:34:25 2019 @@ -66,6 +66,7 @@ public abstract class EntityFunction<T e */ public static class LENGTH extends EntityFunctionSingle<Integer> { public static final Fetcher<Integer> FETCHER = new Fetcher<Integer>() { + @Override public Integer getValue(Object value) { return value.toString().length(); } }; @@ -80,6 +81,7 @@ public abstract class EntityFunction<T e */ public static class TRIM extends EntityFunctionSingle<String> { public static final Fetcher<String> FETCHER = new Fetcher<String>() { + @Override public String getValue(Object value) { return value.toString().trim(); } }; @@ -94,6 +96,7 @@ public abstract class EntityFunction<T e */ public static class UPPER extends EntityFunctionSingle<String> { public static final Fetcher<String> FETCHER = new Fetcher<String>() { + @Override public String getValue(Object value) { return value.toString().toUpperCase(Locale.getDefault()); } }; @@ -108,6 +111,7 @@ public abstract class EntityFunction<T e */ public static class LOWER extends EntityFunctionSingle<String> { public static final Fetcher<String> FETCHER = new Fetcher<String>() { + @Override public String getValue(Object value) { return value.toString().toLowerCase(Locale.getDefault()); } }; Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java Sat Apr 27 19:34:25 2019 @@ -295,6 +295,7 @@ public abstract class EntityOperator<L, public abstract EntityCondition freeze(L lhs, R rhs); public static final Comparable<?> WILDCARD = new Comparable<Object>() { + @Override public int compareTo(Object obj) { if (obj != WILDCARD) { throw new ClassCastException(); Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByItem.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByItem.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByItem.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByItem.java Sat Apr 27 19:34:25 2019 @@ -153,6 +153,7 @@ public class OrderByItem implements Comp value.validateSql(modelEntity); } + @Override public int compare(GenericEntity obj1, GenericEntity obj2) { Comparable<Object> value1 = UtilGenerics.cast(value.getValue(obj1)); Object value2 = value.getValue(obj2); Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByList.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByList.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByList.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByList.java Sat Apr 27 19:34:25 2019 @@ -96,6 +96,7 @@ public class OrderByList implements Comp } } + @Override public int compare(GenericEntity entity1, GenericEntity entity2) { int result = 0; for (OrderByItem orderByItem: orderByList) { Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DBCPConnectionFactory.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DBCPConnectionFactory.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DBCPConnectionFactory.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DBCPConnectionFactory.java Sat Apr 27 19:34:25 2019 @@ -59,6 +59,7 @@ public class DBCPConnectionFactory imple protected static final ConcurrentHashMap<String, DebugManagedDataSource<? extends Connection>> dsCache = new ConcurrentHashMap<>(); + @Override public Connection getConnection(GenericHelperInfo helperInfo, JdbcElement abstractJdbc) throws SQLException, GenericEntityException { String cacheKey = helperInfo.getHelperFullName(); DebugManagedDataSource<? extends Connection> mds = dsCache.get(cacheKey); @@ -159,6 +160,7 @@ public class DBCPConnectionFactory imple return TransactionUtil.getCursorConnection(helperInfo, mds.getConnection()); } + @Override public void closeAll() { // no methods on the pool to shutdown; so just clearing for GC dsCache.clear(); Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/GenericHelperDAO.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/GenericHelperDAO.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/GenericHelperDAO.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/GenericHelperDAO.java Sat Apr 27 19:34:25 2019 @@ -51,6 +51,7 @@ public class GenericHelperDAO implements genericDAO = GenericDAO.getGenericDAO(helperInfo); } + @Override public String getHelperName() { return this.helperInfo.getHelperFullName(); } @@ -58,6 +59,7 @@ public class GenericHelperDAO implements /** Creates a Entity in the form of a GenericValue and write it to the database *@return GenericValue instance containing the new instance */ + @Override public GenericValue create(GenericValue value) throws GenericEntityException { if (value == null) { return null; @@ -71,6 +73,7 @@ public class GenericHelperDAO implements *@param primaryKey The primary key to find by. *@return The GenericValue corresponding to the primaryKey */ + @Override public GenericValue findByPrimaryKey(GenericPK primaryKey) throws GenericEntityException { if (primaryKey == null) { return null; @@ -86,6 +89,7 @@ public class GenericHelperDAO implements *@param keys The keys, or names, of the values to retrieve; only these values will be retrieved *@return The GenericValue corresponding to the primaryKey */ + @Override public GenericValue findByPrimaryKeyPartial(GenericPK primaryKey, Set<String> keys) throws GenericEntityException { if (primaryKey == null) { return null; @@ -102,6 +106,7 @@ public class GenericHelperDAO implements *@param primaryKeys A List of primary keys to find by. *@return List of GenericValue objects corresponding to the passed primaryKey objects */ + @Override public List<GenericValue> findAllByPrimaryKeys(List<GenericPK> primaryKeys) throws GenericEntityException { if (primaryKeys == null) return null; List<GenericValue> results = new LinkedList<>(); @@ -118,6 +123,7 @@ public class GenericHelperDAO implements *@param primaryKey The primary key of the entity to remove. *@return int representing number of rows effected by this operation */ + @Override public int removeByPrimaryKey(GenericPK primaryKey) throws GenericEntityException { if (primaryKey == null) return 0; if (Debug.verboseOn()) Debug.logVerbose("Removing GenericPK: " + primaryKey.toString(), module); @@ -135,17 +141,20 @@ public class GenericHelperDAO implements * DONE WITH IT (preferably in a finally block), * AND DON'T LEAVE IT OPEN TOO LONG BECAUSE IT WILL MAINTAIN A DATABASE CONNECTION. */ + @Override public EntityListIterator findListIteratorByCondition(Delegator delegator, ModelEntity modelEntity, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions) throws GenericEntityException { return genericDAO.selectListIteratorByCondition(delegator, modelEntity, whereEntityCondition, havingEntityCondition, fieldsToSelect, orderBy, findOptions); } + @Override public List<GenericValue> findByMultiRelation(GenericValue value, ModelRelation modelRelationOne, ModelEntity modelEntityOne, ModelRelation modelRelationTwo, ModelEntity modelEntityTwo, List<String> orderBy) throws GenericEntityException { return genericDAO.selectByMultiRelation(value, modelRelationOne, modelEntityOne, modelRelationTwo, modelEntityTwo, orderBy); } + @Override public long findCountByCondition(Delegator delegator, ModelEntity modelEntity, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, EntityFindOptions findOptions) throws GenericEntityException { return genericDAO.selectCountByCondition(delegator, modelEntity, whereEntityCondition, havingEntityCondition, findOptions); } @@ -155,6 +164,7 @@ public class GenericHelperDAO implements *@param condition The condition that restricts the list of removed values *@return int representing number of rows effected by this operation */ + @Override public int removeByCondition(Delegator delegator, ModelEntity modelEntity, EntityCondition condition) throws GenericEntityException { if (modelEntity == null || condition == null) { return 0; @@ -166,6 +176,7 @@ public class GenericHelperDAO implements *@param value GenericValue instance containing the entity *@return int representing number of rows effected by this operation */ + @Override public int store(GenericValue value) throws GenericEntityException { if (value == null) { return 0; @@ -180,6 +191,7 @@ public class GenericHelperDAO implements *@return int representing number of rows effected by this operation *@throws GenericEntityException */ + @Override public int storeByCondition(Delegator delegator, ModelEntity modelEntity, Map<String, ? extends Object> fieldsToSet, EntityCondition condition) throws GenericEntityException { if (modelEntity == null || condition == null) { return 0; @@ -192,6 +204,7 @@ public class GenericHelperDAO implements *@param messages List to put any result messages in *@param addMissing Flag indicating whether or not to add missing entities and fields on the server */ + @Override public void checkDataSource(Map<String, ModelEntity> modelEntities, List<String> messages, boolean addMissing) throws GenericEntityException { genericDAO.checkDb(modelEntities, messages, addMissing); } Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/ReadOnlyHelperDAO.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/ReadOnlyHelperDAO.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/ReadOnlyHelperDAO.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/ReadOnlyHelperDAO.java Sat Apr 27 19:34:25 2019 @@ -50,6 +50,7 @@ public class ReadOnlyHelperDAO implement genericDAO = GenericDAO.getGenericDAO(helperInfo); } + @Override public String getHelperName() { return this.helperInfo.getHelperFullName(); } @@ -57,6 +58,7 @@ public class ReadOnlyHelperDAO implement /** Read only, no creation realize on the database *@return null */ + @Override public GenericValue create(GenericValue value) throws GenericEntityException { return null; } @@ -65,6 +67,7 @@ public class ReadOnlyHelperDAO implement *@param primaryKey The primary key to find by. *@return The GenericValue corresponding to the primaryKey */ + @Override public GenericValue findByPrimaryKey(GenericPK primaryKey) throws GenericEntityException { if (primaryKey == null) { return null; @@ -80,6 +83,7 @@ public class ReadOnlyHelperDAO implement *@param keys The keys, or names, of the values to retrieve; only these values will be retrieved *@return The GenericValue corresponding to the primaryKey */ + @Override public GenericValue findByPrimaryKeyPartial(GenericPK primaryKey, Set<String> keys) throws GenericEntityException { if (primaryKey == null) { return null; @@ -96,6 +100,7 @@ public class ReadOnlyHelperDAO implement *@param primaryKeys A List of primary keys to find by. *@return List of GenericValue objects corresponding to the passed primaryKey objects */ + @Override public List<GenericValue> findAllByPrimaryKeys(List<GenericPK> primaryKeys) throws GenericEntityException { if (primaryKeys == null) return null; List<GenericValue> results = new LinkedList<>(); @@ -111,6 +116,7 @@ public class ReadOnlyHelperDAO implement /** Read only, no remove realize on the database *@return 0 */ + @Override public int removeByPrimaryKey(GenericPK primaryKey) throws GenericEntityException { return 0; } @@ -125,17 +131,20 @@ public class ReadOnlyHelperDAO implement *@return EntityListIterator representing the result of the query: NOTE THAT THIS MUST BE CLOSED WHEN YOU ARE * DONE WITH IT, AND DON'T LEAVE IT OPEN TOO LONG BEACUSE IT WILL MAINTAIN A DATABASE CONNECTION. */ + @Override public EntityListIterator findListIteratorByCondition(Delegator delegator, ModelEntity modelEntity, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions) throws GenericEntityException { return genericDAO.selectListIteratorByCondition(delegator, modelEntity, whereEntityCondition, havingEntityCondition, fieldsToSelect, orderBy, findOptions); } + @Override public List<GenericValue> findByMultiRelation(GenericValue value, ModelRelation modelRelationOne, ModelEntity modelEntityOne, ModelRelation modelRelationTwo, ModelEntity modelEntityTwo, List<String> orderBy) throws GenericEntityException { return genericDAO.selectByMultiRelation(value, modelRelationOne, modelEntityOne, modelRelationTwo, modelEntityTwo, orderBy); } + @Override public long findCountByCondition(Delegator delegator, ModelEntity modelEntity, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, EntityFindOptions findOptions) throws GenericEntityException { return genericDAO.selectCountByCondition(delegator, modelEntity, whereEntityCondition, havingEntityCondition, findOptions); } @@ -144,6 +153,7 @@ public class ReadOnlyHelperDAO implement /** Read only, no remove realize on the database *@return 0 */ + @Override public int removeByCondition(Delegator delegator, ModelEntity modelEntity, EntityCondition condition) throws GenericEntityException { return 0; } @@ -151,6 +161,7 @@ public class ReadOnlyHelperDAO implement /** Read only, no store realize on the database *@return 0 */ + @Override public int store(GenericValue value) throws GenericEntityException { return 0; } @@ -158,6 +169,7 @@ public class ReadOnlyHelperDAO implement /** Read only, no store realize on the database *@return 0 */ + @Override public int storeByCondition(Delegator delegator, ModelEntity modelEntity, Map<String, ? extends Object> fieldsToSet, EntityCondition condition) throws GenericEntityException { return 0; } @@ -167,6 +179,7 @@ public class ReadOnlyHelperDAO implement *@param messages List to put any result messages in *@param addMissing Flag indicating whether or not to add missing entities and fields on the server by force to false on read only mode */ + @Override public void checkDataSource(Map<String, ModelEntity> modelEntities, List<String> messages, boolean addMissing) throws GenericEntityException { genericDAO.checkDb(modelEntities, messages, false); } Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java Sat Apr 27 19:34:25 2019 @@ -188,6 +188,7 @@ public final class EntityFinderUtil { this.ignoreExdr = FlexibleStringExpander.getInstance(conditionExprElement.getAttribute("ignore")); } + @Override public EntityCondition createCondition(Map<String, ? extends Object> context, ModelEntity modelEntity, ModelFieldTypeReader modelFieldTypeReader) { if ("true".equals(this.ignoreExdr.expandString(context))) { return null; @@ -289,6 +290,7 @@ public final class EntityFinderUtil { } } + @Override public EntityCondition createCondition(Map<String, ? extends Object> context, ModelEntity modelEntity, ModelFieldTypeReader modelFieldTypeReader) { if (this.conditionList == null) { return null; @@ -320,6 +322,7 @@ public final class EntityFinderUtil { this.fieldNameAcsr = FlexibleMapAccessor.getInstance(fieldNameAttribute); } + @Override public EntityCondition createCondition(Map<String, ? extends Object> context, ModelEntity modelEntity, ModelFieldTypeReader modelFieldTypeReader) { return (EntityCondition) fieldNameAcsr.get(context); } @@ -362,6 +365,7 @@ public final class EntityFinderUtil { } } + @Override public void handleOutput(EntityListIterator eli, Map<String, Object> context, FlexibleMapAccessor<Object> listAcsr) { int start = getStart(context) + 1; // ELI index is one-based. int size = getSize(context); @@ -375,6 +379,7 @@ public final class EntityFinderUtil { } } + @Override public void handleOutput(List<GenericValue> results, Map<String, Object> context, FlexibleMapAccessor<Object> listAcsr) { List<GenericValue> result = null; int start = getStart(context); @@ -424,6 +429,7 @@ public final class EntityFinderUtil { } } + @Override public void handleOutput(EntityListIterator eli, Map<String, Object> context, FlexibleMapAccessor<Object> listAcsr) { int index = this.getIndex(context); int size = this.getSize(context); @@ -437,6 +443,7 @@ public final class EntityFinderUtil { } } + @Override public void handleOutput(List<GenericValue> results, Map<String, Object> context, FlexibleMapAccessor<Object> listAcsr) { List<GenericValue> result = null; int index = this.getIndex(context); @@ -461,10 +468,12 @@ public final class EntityFinderUtil { // no parameters, nothing to do } + @Override public void handleOutput(EntityListIterator eli, Map<String, Object> context, FlexibleMapAccessor<Object> listAcsr) { listAcsr.put(context, eli); } + @Override public void handleOutput(List<GenericValue> results, Map<String, Object> context, FlexibleMapAccessor<Object> listAcsr) { throw new IllegalArgumentException("Cannot handle output with use-iterator when the query is cached, or the result in general is not an EntityListIterator"); } @@ -475,6 +484,7 @@ public final class EntityFinderUtil { // no parameters, nothing to do } + @Override public void handleOutput(EntityListIterator eli, Map<String, Object> context, FlexibleMapAccessor<Object> listAcsr) { try { listAcsr.put(context, eli.getCompleteList()); @@ -486,6 +496,7 @@ public final class EntityFinderUtil { } } + @Override public void handleOutput(List<GenericValue> results, Map<String, Object> context, FlexibleMapAccessor<Object> listAcsr) { listAcsr.put(context, results); } Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java Sat Apr 27 19:34:25 2019 @@ -40,6 +40,7 @@ public class CursorConnection extends Ab this.con = con; } + @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if ("prepareStatement".equals(method.getName())) { Debug.logInfo("prepareStatement", module); Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java Sat Apr 27 19:34:25 2019 @@ -41,6 +41,7 @@ public class CursorResultSet extends Abs rs = stmt.executeQuery(query); } + @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if ("close".equals(method.getName())) { close(); Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java Sat Apr 27 19:34:25 2019 @@ -46,6 +46,7 @@ public class CursorStatement extends Abs Debug.logInfo("beganTransaction=" + beganTransaction + ", autoCommit=" + autoCommit, module); } + @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if ("close".equals(method.getName())) { stmt.getConnection().setAutoCommit(autoCommit); Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java Sat Apr 27 19:34:25 2019 @@ -429,6 +429,7 @@ public class DatabaseUtil { for (ModelEntity curEntity: entitiesAdded) { if (curEntity.getRelationsOneSize() > 0) { fkIndicesFutures.add(executor.submit(new AbstractCountingCallable(curEntity, modelEntities) { + @Override public AbstractCountingCallable call() throws Exception { count = createForeignKeyIndices(entity, datasourceInfo.getConstraintNameClipLength(), messages); return this; @@ -458,6 +459,7 @@ public class DatabaseUtil { for (ModelEntity curEntity: entitiesAdded) { if (curEntity.getIndexesSize() > 0) { disFutures.add(executor.submit(new AbstractCountingCallable(curEntity, modelEntities) { + @Override public AbstractCountingCallable call() throws Exception { count = createDeclaredIndices(entity, messages); return this; @@ -1017,6 +1019,7 @@ public class DatabaseUtil { private AbstractCountingCallable createPrimaryKeyFetcher(final DatabaseMetaData dbData, final String lookupSchemaName, final boolean needsUpperCase, final Map<String, Map<String, ColumnCheckInfo>> colInfo, final Collection<String> messages, final String curTable) { return new AbstractCountingCallable(null, null) { + @Override public AbstractCountingCallable call() throws Exception { if (Debug.verboseOn()) Debug.logVerbose("Fetching primary keys for " + curTable, module); ResultSet rsPks = dbData.getPrimaryKeys(null, lookupSchemaName, curTable); @@ -1504,6 +1507,7 @@ public class DatabaseUtil { this.tableName = tableName; } + @Override public CreateTableCallable call() throws Exception { String errMsg = createTable(entity, modelEntities, false); if (UtilValidate.isNotEmpty(errMsg)) { Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntity.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntity.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntity.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntity.java Sat Apr 27 19:34:25 2019 @@ -1302,6 +1302,7 @@ public class ModelEntity implements Comp return returnString.toString(); } + @Override public int compareTo(ModelEntity otherModelEntity) { /* This DOESN'T WORK, so forget it... using two passes Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java Sat Apr 27 19:34:25 2019 @@ -838,6 +838,7 @@ public class ModelViewEntity extends Mod } } + @Override public Iterator<String> iterator() { if (this.fieldsToExclude == null) { return Collections.<String>emptySet().iterator(); @@ -1004,6 +1005,7 @@ public class ModelViewEntity extends Mod this.complexAliasMembers.addAll(complexAliasMembers); } + @Override public void makeAliasColName(StringBuilder colNameBuffer, StringBuilder fieldTypeBuffer, ModelViewEntity modelViewEntity, ModelReader modelReader) { if (complexAliasMembers.size() == 0) { return; @@ -1060,6 +1062,7 @@ public class ModelViewEntity extends Mod /** * Make the alias as follows: function(coalesce(entityAlias.field, defaultValue)) */ + @Override public void makeAliasColName(StringBuilder colNameBuffer, StringBuilder fieldTypeBuffer, ModelViewEntity modelViewEntity, ModelReader modelReader) { if(UtilValidate.isEmpty(entityAlias) && UtilValidate.isEmpty(field) @@ -1173,6 +1176,7 @@ public class ModelViewEntity extends Mod return this.keyMaps.iterator(); } + @Override public Iterator<ModelKeyMap> iterator() { return this.keyMaps.iterator(); } @@ -1374,6 +1378,7 @@ public class ModelViewEntity extends Mod this.relEntityAlias = relEntityAlias; } + @Override public EntityCondition createCondition(ModelFieldTypeReader modelFieldTypeReader, List<String> entityAliasStack) { Object value = this.value; // If IN or BETWEEN operator, see if value is a literal list and split it @@ -1489,6 +1494,7 @@ public class ModelViewEntity extends Mod } } + @Override public EntityCondition createCondition(ModelFieldTypeReader modelFieldTypeReader, List<String> entityAliasStack) { if (this.conditionList.size() == 0) { return null; Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/DumbTransactionFactory.java Sat Apr 27 19:34:25 2019 @@ -46,67 +46,86 @@ public class DumbTransactionFactory impl public static final String module = DumbTransactionFactory.class.getName(); + @Override public TransactionManager getTransactionManager() { return new TransactionManager() { + @Override public void begin() throws NotSupportedException, SystemException { } + @Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { } + @Override public int getStatus() throws SystemException { return TransactionUtil.STATUS_NO_TRANSACTION; } + @Override public Transaction getTransaction() throws SystemException { return null; } + @Override public void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException { } + @Override public void rollback() throws IllegalStateException, SecurityException, SystemException { } + @Override public void setRollbackOnly() throws IllegalStateException, SystemException { } + @Override public void setTransactionTimeout(int i) throws SystemException { } + @Override public Transaction suspend() throws SystemException { return null; } }; } + @Override public UserTransaction getUserTransaction() { return new UserTransaction() { + @Override public void begin() throws NotSupportedException, SystemException { } + @Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { } + @Override public int getStatus() throws SystemException { return TransactionUtil.STATUS_NO_TRANSACTION; } + @Override public void rollback() throws IllegalStateException, SecurityException, SystemException { } + @Override public void setRollbackOnly() throws IllegalStateException, SystemException { } + @Override public void setTransactionTimeout(int i) throws SystemException { } }; } + @Override public String getTxMgrName() { return "dumb"; } + @Override public Connection getConnection(GenericHelperInfo helperInfo) throws SQLException, GenericEntityException { Datasource datasourceInfo = EntityConfig.getDatasource(helperInfo.getHelperBaseName()); @@ -118,5 +137,6 @@ public class DumbTransactionFactory impl return null; } + @Override public void shutdown() {} } Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GenericXaResource.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GenericXaResource.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GenericXaResource.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GenericXaResource.java Sat Apr 27 19:34:25 2019 @@ -79,9 +79,7 @@ public abstract class GenericXaResource } } - /** - * @see javax.transaction.xa.XAResource#start(javax.transaction.xa.Xid xid, int flag) - */ + @Override public void start(Xid xid, int flag) throws XAException { if (this.active) { if (this.xid != null && this.xid.equals(xid)) { @@ -100,9 +98,7 @@ public abstract class GenericXaResource this.start(); } - /** - * @see javax.transaction.xa.XAResource#end(javax.transaction.xa.Xid xid, int flag) - */ + @Override public void end(Xid xid, int flag) throws XAException { if (!this.active) { throw new XAException(XAException.XAER_PROTO); @@ -114,9 +110,7 @@ public abstract class GenericXaResource this.active = false; } - /** - * @see javax.transaction.xa.XAResource#forget(javax.transaction.xa.Xid xid) - */ + @Override public void forget(Xid xid) throws XAException { if (this.xid == null || !this.xid.equals(xid)) { throw new XAException(XAException.XAER_NOTA); @@ -128,9 +122,7 @@ public abstract class GenericXaResource } } - /** - * @see javax.transaction.xa.XAResource#prepare(javax.transaction.xa.Xid xid) - */ + @Override public int prepare(Xid xid) throws XAException { if (this.xid == null || !this.xid.equals(xid)) { throw new XAException(XAException.XAER_NOTA); @@ -138,9 +130,7 @@ public abstract class GenericXaResource return XA_OK; } - /** - * @see javax.transaction.xa.XAResource#recover(int flag) - */ + @Override public Xid[] recover(int flag) throws XAException { if (this.xid == null) { return new Xid[0]; @@ -148,24 +138,17 @@ public abstract class GenericXaResource return new Xid[] {this.xid}; } - /** - * @see javax.transaction.xa.XAResource#isSameRM(javax.transaction.xa.XAResource xaResource) - */ + @Override public boolean isSameRM(XAResource xaResource) throws XAException { return xaResource == this; } - /** - * @see javax.transaction.xa.XAResource#getTransactionTimeout() - */ + @Override public int getTransactionTimeout() throws XAException { return this.timeout == null ? 0 : this.timeout; } - /** - * @see javax.transaction.xa.XAResource#setTransactionTimeout(int seconds) - * Note: the valus is saved but in the current implementation this is not used. - */ + @Override public boolean setTransactionTimeout(int seconds) throws XAException { this.timeout = (seconds == 0 ? null : seconds); return true; @@ -183,14 +166,10 @@ public abstract class GenericXaResource return this.xid; } - /** - * @see javax.transaction.xa.XAResource#commit(javax.transaction.xa.Xid xid, boolean onePhase) - */ + @Override public abstract void commit(Xid xid, boolean onePhase) throws XAException; - /** - * @see javax.transaction.xa.XAResource#rollback(javax.transaction.xa.Xid xid) - */ + @Override public abstract void rollback(Xid xid) throws XAException; /** Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GeronimoTransactionFactory.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GeronimoTransactionFactory.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GeronimoTransactionFactory.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/GeronimoTransactionFactory.java Sat Apr 27 19:34:25 2019 @@ -54,24 +54,22 @@ public class GeronimoTransactionFactory } } - /* - * @see org.apache.ofbiz.entity.transaction.TransactionFactory#getTransactionManager() - */ + @Override public TransactionManager getTransactionManager() { return geronimoTransactionManager; } - /* - * @see org.apache.ofbiz.entity.transaction.TransactionFactory#getUserTransaction() - */ + @Override public UserTransaction getUserTransaction() { return geronimoTransactionManager; } + @Override public String getTxMgrName() { return "geronimo"; } + @Override public Connection getConnection(GenericHelperInfo helperInfo) throws SQLException, GenericEntityException { Datasource datasourceInfo = EntityConfig.getDatasource(helperInfo.getHelperBaseName()); @@ -82,6 +80,7 @@ public class GeronimoTransactionFactory return null; } + @Override public void shutdown() { ConnectionFactoryLoader.getInstance().closeAll(); } Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/JNDITransactionFactory.java Sat Apr 27 19:34:25 2019 @@ -56,6 +56,7 @@ public class JNDITransactionFactory impl protected static final ConcurrentHashMap<String, DataSource> dsCache = new ConcurrentHashMap<>(); + @Override public TransactionManager getTransactionManager() { if (transactionManager == null) { synchronized (JNDITransactionFactory.class) { @@ -90,6 +91,7 @@ public class JNDITransactionFactory impl return transactionManager; } + @Override public UserTransaction getUserTransaction() { if (userTransaction == null) { synchronized (JNDITransactionFactory.class) { @@ -125,10 +127,12 @@ public class JNDITransactionFactory impl return userTransaction; } + @Override public String getTxMgrName() { return "jndi"; } + @Override public Connection getConnection(GenericHelperInfo helperInfo) throws SQLException, GenericEntityException { Datasource datasourceInfo = EntityConfig.getDatasource(helperInfo.getHelperBaseName()); @@ -207,5 +211,6 @@ public class JNDITransactionFactory impl return null; } + @Override public void shutdown() {} } Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java Sat Apr 27 19:34:25 2019 @@ -926,10 +926,12 @@ public final class TransactionUtil imple } public static class StampClearSync implements Synchronization { + @Override public void afterCompletion(int status) { TransactionUtil.clearTransactionStamps(); } + @Override public void beforeCompletion() { } } @@ -941,6 +943,7 @@ public final class TransactionUtil imple this.callable = callable; } + @Override public V call() throws GenericEntityException { Transaction suspended = TransactionUtil.suspend(); try { @@ -975,6 +978,7 @@ public final class TransactionUtil imple this.printException = printException; } + @Override public V call() throws GenericEntityException { boolean tx = TransactionUtil.begin(timeout); Throwable transactionAbortCause = null; Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/Converters.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/Converters.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/Converters.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/Converters.java Sat Apr 27 19:34:25 2019 @@ -47,6 +47,7 @@ public class Converters implements Conve super(JSON.class, GenericValue.class); } + @Override public GenericValue convert(JSON obj) throws ConversionException { Map<String, Object> fieldMap; try { @@ -79,6 +80,7 @@ public class Converters implements Conve super(GenericValue.class, JSON.class); } + @Override public JSON convert(GenericValue obj) throws ConversionException { Map<String, Object> fieldMap = new HashMap<>(obj); fieldMap.put("_DELEGATOR_NAME_", obj.getDelegator().getDelegatorName()); @@ -96,6 +98,7 @@ public class Converters implements Conve super(GenericValue.class, List.class); } + @Override public List<GenericValue> convert(GenericValue obj) throws ConversionException { List<GenericValue> tempList = new LinkedList<>(); tempList.add(obj); @@ -108,6 +111,7 @@ public class Converters implements Conve super(GenericValue.class, Set.class); } + @Override public Set<GenericValue> convert(GenericValue obj) throws ConversionException { Set<GenericValue> tempSet = new HashSet<>(); tempSet.add(obj); @@ -120,6 +124,7 @@ public class Converters implements Conve super(GenericValue.class, String.class); } + @Override public String convert(GenericValue obj) throws ConversionException { return obj.toString(); } @@ -130,6 +135,7 @@ public class Converters implements Conve super(GenericEntity.NullField.class, Object.class); } + @Override public Object convert(GenericEntity.NullField obj) throws ConversionException { return null; } @@ -140,11 +146,13 @@ public class Converters implements Conve super(Object.class, GenericEntity.NullField.class); } + @Override public GenericEntity.NullField convert(Object obj) throws ConversionException { return GenericEntity.NULL_FIELD; } } + @Override public void loadConverters() { org.apache.ofbiz.base.conversion.Converters.loadContainedConverters(Converters.class); } Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityListIterator.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityListIterator.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityListIterator.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityListIterator.java Sat Apr 27 19:34:25 2019 @@ -157,6 +157,7 @@ public class EntityListIterator implemen * @throws GenericEntityException * if the {@link EntityListIterator} cannot be closed. */ + @Override public void close() throws GenericEntityException { if (closed) { String modelEntityName = modelEntity != null ? modelEntity.getEntityName() : ""; @@ -280,6 +281,7 @@ public class EntityListIterator implemen * this.next()) != null) { ... } * */ + @Override public boolean hasNext() { if (!haveShowHasNextWarning) { // DEJ20050207 To further discourage use of this, and to find existing use, always log a big warning showing where it is used: @@ -306,6 +308,7 @@ public class EntityListIterator implemen * PLEASE NOTE: Because of the nature of the JDBC ResultSet interface this method can be very inefficient. * It is much better to just use previous() until it returns null. */ + @Override public boolean hasPrevious() { try { // do a quick game to see if the resultSet is empty: @@ -326,6 +329,7 @@ public class EntityListIterator implemen * * @return the next element or null, if there is no next element. */ + @Override public GenericValue next() { try { return resultSet.next() ? currentGenericValue() : null; @@ -341,6 +345,7 @@ public class EntityListIterator implemen /** * Returns the index of the next result, but does not guarantee that there will be a next result. */ + @Override public int nextIndex() { try { return currentIndex() + 1; @@ -354,6 +359,7 @@ public class EntityListIterator implemen * Moves the cursor to the previous position and returns the GenericValue object for that position; * if there is no previous, returns null. */ + @Override public GenericValue previous() { try { return resultSet.previous() ? currentGenericValue() : null; @@ -369,6 +375,7 @@ public class EntityListIterator implemen /** * Returns the index of the previous result, but does not guarantee that there will be a previous result. */ + @Override public int previousIndex() { try { return currentIndex() - 1; @@ -507,6 +514,7 @@ public class EntityListIterator implemen /** * Unsupported {@link ListIterator#add(Object)} method. */ + @Override public void add(GenericValue obj) { throw new GeneralRuntimeException("CursorListIterator currently only supports read-only access"); } @@ -514,6 +522,7 @@ public class EntityListIterator implemen /** * Unsupported {@link ListIterator#remove()} method. */ + @Override public void remove() { throw new GeneralRuntimeException("CursorListIterator currently only supports read-only access"); } @@ -521,6 +530,7 @@ public class EntityListIterator implemen /** * Unsupported {@link ListIterator#set(Object)} method. */ + @Override public void set(GenericValue obj) { throw new GeneralRuntimeException("CursorListIterator currently only supports read-only access"); } Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java Sat Apr 27 19:34:25 2019 @@ -269,6 +269,7 @@ public class EntitySaxReader extends Def // ======== ContentHandler interface implementation ======== + @Override public void characters(char[] values, int offset, int count) throws SAXException { if (isParseForTemplate) { // if null, don't worry about it @@ -294,6 +295,7 @@ public class EntitySaxReader extends Def } } + @Override public void endElement(String namespaceURI, String localName, String fullNameString) throws SAXException { if (Debug.verboseOn()) Debug.logVerbose("endElement: localName=" + localName + ", fullName=" + fullNameString + ", numberRead=" + numberRead, module); if ("entity-engine-xml".equals(fullNameString)) { @@ -444,10 +446,12 @@ public class EntitySaxReader extends Def } } + @Override public void setDocumentLocator(org.xml.sax.Locator locator) { this.locator = locator; } + @Override public void startElement(String namepsaceURI, String localName, String fullNameString, Attributes attributes) throws SAXException { if (Debug.verboseOn()) Debug.logVerbose("startElement: localName=" + localName + ", fullName=" + fullNameString + ", attributes=" + attributes, module); if ("entity-engine-xml".equals(fullNameString)) { @@ -584,15 +588,18 @@ public class EntitySaxReader extends Def // ======== ErrorHandler interface implementation ======== + @Override public void error(org.xml.sax.SAXParseException exception) throws SAXException { Debug.logWarning(exception, "Error reading XML on line " + exception.getLineNumber() + ", column " + exception.getColumnNumber(), module); } + @Override public void fatalError(org.xml.sax.SAXParseException exception) throws SAXException { Debug.logError(exception, "Fatal Error reading XML on line " + exception.getLineNumber() + ", column " + exception.getColumnNumber(), module); throw new SAXException("Fatal Error reading XML on line " + exception.getLineNumber() + ", column " + exception.getColumnNumber(), exception); } + @Override public void warning(org.xml.sax.SAXParseException exception) throws SAXException { Debug.logWarning(exception, "Warning reading XML on line " + exception.getLineNumber() + ", column " + exception.getColumnNumber(), module); } Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/cache/EntityCacheServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/cache/EntityCacheServices.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/cache/EntityCacheServices.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/cache/EntityCacheServices.java Sat Apr 27 19:34:25 2019 @@ -49,6 +49,7 @@ public class EntityCacheServices impleme public EntityCacheServices() {} + @Override public void setDelegator(Delegator delegator, String userLoginId) { this.delegator = delegator; this.dispatcher = EntityServiceFactory.getLocalDispatcher(delegator); @@ -65,6 +66,7 @@ public class EntityCacheServices impleme return userLogin; } + @Override public void distributedClearCacheLine(GenericValue value) { // Debug.logInfo("running distributedClearCacheLine for value: " + value, module); if (this.dispatcher == null) { @@ -85,6 +87,7 @@ public class EntityCacheServices impleme } } + @Override public void distributedClearCacheLineFlexible(GenericEntity dummyPK) { // Debug.logInfo("running distributedClearCacheLineFlexible for dummyPK: " + dummyPK, module); if (this.dispatcher == null) { @@ -105,6 +108,7 @@ public class EntityCacheServices impleme } } + @Override public void distributedClearCacheLineByCondition(String entityName, EntityCondition condition) { // Debug.logInfo("running distributedClearCacheLineByCondition for (name, condition): " + entityName + ", " + condition + ")", module); if (this.dispatcher == null) { @@ -125,6 +129,7 @@ public class EntityCacheServices impleme } } + @Override public void distributedClearCacheLine(GenericPK primaryKey) { // Debug.logInfo("running distributedClearCacheLine for primaryKey: " + primaryKey, module); if (this.dispatcher == null) { @@ -145,6 +150,7 @@ public class EntityCacheServices impleme } } + @Override public void clearAllCaches() { if (this.dispatcher == null) { Debug.logWarning("No dispatcher is available, somehow the setDelegator (which also creates a dispatcher) was not called, not running distributed clear all caches", module); Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/DelegatorEcaHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/DelegatorEcaHandler.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/DelegatorEcaHandler.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/DelegatorEcaHandler.java Sat Apr 27 19:34:25 2019 @@ -52,6 +52,7 @@ public class DelegatorEcaHandler impleme public DelegatorEcaHandler() { } + @Override public void setDelegator(Delegator delegator) { this.delegator = delegator; this.delegatorName = delegator.getDelegatorName(); @@ -80,12 +81,14 @@ public class DelegatorEcaHandler impleme } } + @Override public Map<String, List<EntityEcaRule>> getEntityEventMap(String entityName) { Map<String, Map<String, List<EntityEcaRule>>> ecaCache = EntityEcaUtil.getEntityEcaCache(this.entityEcaReaderName); if (ecaCache == null) return null; return ecaCache.get(entityName); } + @Override public void evalRules(String currentOperation, Map<String, List<EntityEcaRule>> eventMap, String event, GenericEntity value, boolean isError) throws GenericEntityException { // if the eventMap is passed we save a HashMap lookup, but if not that's okay we'll just look it up now if (eventMap == null) eventMap = this.getEntityEventMap(value.getEntityName()); Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaAction.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaAction.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaAction.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaAction.java Sat Apr 27 19:34:25 2019 @@ -117,6 +117,7 @@ public final class EntityEcaAction imple } } + @Override public String toString() { StringBuilder buf = new StringBuilder(); if (UtilValidate.isNotEmpty(serviceName)) buf.append("[").append(serviceName).append("]"); Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java Sat Apr 27 19:34:25 2019 @@ -957,6 +957,7 @@ public class EntityPermissionChecker { this.entityName = getterElement.getAttribute("entity-name"); } + @Override public boolean getNext() { boolean hasNext = false; if (iter != null && iter.hasNext()) { @@ -966,17 +967,21 @@ public class EntityPermissionChecker { return hasNext; } + @Override public String getRoleValue() { return this.currentValue.getString(this.roleFieldName); } + @Override public String getOperationValue() { return this.currentValue.getString(this.operationFieldName); } + @Override public String getStatusValue() { return this.currentValue.getString(this.statusFieldName); } + @Override public int getPrivilegeValue() throws GenericEntityException { int privilegeEnumSeq = -1; String privilegeEnumId = null; @@ -1000,10 +1005,12 @@ public class EntityPermissionChecker { } + @Override public String getAuxiliaryValue() { return this.currentValue.getString(this.auxiliaryFieldName); } + @Override public void setOperationList(String operationIdString) { this.operationList = null; @@ -1012,18 +1019,22 @@ public class EntityPermissionChecker { } } + @Override public void setOperationList(List<String> operationList) { this.operationList = operationList; } + @Override public List<String> getOperationList() { return this.operationList; } + @Override public void clearList() { this.entityList = new LinkedList<>(); } + @Override public void init(Delegator delegator) throws GenericEntityException { this.entityList = EntityQuery.use(delegator) .from(this.entityName) @@ -1032,6 +1043,7 @@ public class EntityPermissionChecker { .queryList(); } + @Override public void restart() { this.iter = null; if (this.entityList != null) { @@ -1039,6 +1051,7 @@ public class EntityPermissionChecker { } } + @Override public String dumpAsText() { List<String> fieldNames = UtilMisc.toList("roleFieldName", "auxiliaryFieldName", "statusFieldName"); Map<String, Integer> widths = UtilMisc.toMap("roleFieldName", 24, "auxiliaryFieldName", 24, "statusFieldName", 24); @@ -1147,10 +1160,12 @@ public class EntityPermissionChecker { this.entityIdName = getterElement.getAttribute("entity-id-name"); } + @Override public List<String> getList() { return entityList; } + @Override public void clearList() { this.entityList = new LinkedList<>(); } @@ -1159,6 +1174,7 @@ public class EntityPermissionChecker { this.entityList = lst; } + @Override public void init(Delegator delegator, String entityId) throws GenericEntityException { if (this.entityList == null) { @@ -1173,6 +1189,7 @@ public class EntityPermissionChecker { } } + @Override public String dumpAsText() { StringBuilder buf = new StringBuilder(); buf.append("AUXILIARY: "); @@ -1236,18 +1253,22 @@ public class EntityPermissionChecker { this.roleEntityIdName = getterElement.getAttribute("entity-id-name"); } + @Override public List<String> getList() { return this.roleIdList; } + @Override public void clearList() { this.roleIdList = new LinkedList<>(); } + @Override public void setList(List<String> lst) { this.roleIdList = lst; } + @Override public void init(Delegator delegator, String entityId, String partyId, GenericValue entity) throws GenericEntityException { List<String> lst = getUserRolesFromList(delegator, UtilMisc.toList(entityId), partyId, this.roleEntityIdName, @@ -1258,6 +1279,7 @@ public class EntityPermissionChecker { } } + @Override public void initWithAncestors(Delegator delegator, GenericValue entity, String partyId) throws GenericEntityException { List<String> ownedContentIdList = new LinkedList<>(); @@ -1268,6 +1290,7 @@ public class EntityPermissionChecker { } } + @Override public boolean isOwner(GenericValue entity, String targetPartyId) { boolean isOwner = false; if (entity == null || targetPartyId == null) { @@ -1298,6 +1321,7 @@ public class EntityPermissionChecker { return isOwner; } + @Override public String dumpAsText() { StringBuilder buf = new StringBuilder(); buf.append("ROLES: "); Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/CompareCondition.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/CompareCondition.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/CompareCondition.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/CompareCondition.java Sat Apr 27 19:34:25 2019 @@ -150,6 +150,7 @@ public final class CompareCondition exte } } + @Override public void prettyPrint(StringBuilder messageBuffer, MethodContext methodContext) { String value = valueFse.expandString(methodContext.getEnvMap()); String format = formatFse.expandString(methodContext.getEnvMap()); @@ -196,6 +197,7 @@ public final class CompareCondition exte return new CompareCondition(element, simpleMethod); } + @Override public CompareCondition createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException { return new CompareCondition(element, simpleMethod); } Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/CompareFieldCondition.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/CompareFieldCondition.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/CompareFieldCondition.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/CompareFieldCondition.java Sat Apr 27 19:34:25 2019 @@ -158,6 +158,7 @@ public final class CompareFieldCondition } } + @Override public void prettyPrint(StringBuilder messageBuffer, MethodContext methodContext) { String format = formatFse.expandString(methodContext.getEnvMap()); Object fieldVal = fieldFma.get(methodContext.getEnvMap()); @@ -207,6 +208,7 @@ public final class CompareFieldCondition return new CompareFieldCondition(element, simpleMethod); } + @Override public CompareFieldCondition createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException { return new CompareFieldCondition(element, simpleMethod); } Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/EmptyCondition.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/EmptyCondition.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/EmptyCondition.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/EmptyCondition.java Sat Apr 27 19:34:25 2019 @@ -101,6 +101,7 @@ public final class EmptyCondition extend } } + @Override public void prettyPrint(StringBuilder messageBuffer, MethodContext methodContext) { messageBuffer.append("empty["); messageBuffer.append(fieldFma); @@ -125,6 +126,7 @@ public final class EmptyCondition extend return new EmptyCondition(element, simpleMethod); } + @Override public EmptyCondition createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException { return new EmptyCondition(element, simpleMethod); } Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/HasPermissionCondition.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/HasPermissionCondition.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/HasPermissionCondition.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/HasPermissionCondition.java Sat Apr 27 19:34:25 2019 @@ -118,6 +118,7 @@ public final class HasPermissionConditio } } + @Override public void prettyPrint(StringBuilder messageBuffer, MethodContext methodContext) { messageBuffer.append("has-permission["); messageBuffer.append(this.permissionFse); Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/MasterIf.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/MasterIf.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/MasterIf.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/MasterIf.java Sat Apr 27 19:34:25 2019 @@ -124,10 +124,12 @@ public final class MasterIf extends Meth * A <if> element factory. */ public static final class MasterIfFactory implements Factory<MasterIf> { + @Override public MasterIf createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException { return new MasterIf(element, simpleMethod); } + @Override public String getName() { return "if"; } Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/ValidateMethodCondition.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/ValidateMethodCondition.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/ValidateMethodCondition.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/conditional/ValidateMethodCondition.java Sat Apr 27 19:34:25 2019 @@ -127,6 +127,7 @@ public final class ValidateMethodConditi } } + @Override public void prettyPrint(StringBuilder messageBuffer, MethodContext methodContext) { messageBuffer.append("validate-method["); messageBuffer.append(className); Modified: ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java Sat Apr 27 19:34:25 2019 @@ -101,6 +101,7 @@ public final class SecurityFactory { } } + @Override @Deprecated public Iterator<GenericValue> findUserLoginSecurityGroupByUserLoginId(String userLoginId) { try { @@ -112,6 +113,7 @@ public final class SecurityFactory { } } + @Override @Deprecated public Delegator getDelegator() { return this.delegator; @@ -260,6 +262,7 @@ public final class SecurityFactory { return hasRolePermission(application, action, primaryKey, role, userLogin); } + @Override @Deprecated public boolean securityGroupPermissionExists(String groupId, String permission) { try { @@ -270,6 +273,7 @@ public final class SecurityFactory { } } + @Override @Deprecated public void setDelegator(Delegator delegator) { if (this.delegator != null) { Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/GenericAbstractDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/GenericAbstractDispatcher.java?rev=1858295&r1=1858294&r2=1858295&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/GenericAbstractDispatcher.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/GenericAbstractDispatcher.java Sat Apr 27 19:34:25 2019 @@ -46,20 +46,17 @@ public abstract class GenericAbstractDis public GenericAbstractDispatcher() {} - /** - * @see org.apache.ofbiz.service.LocalDispatcher#schedule(java.lang.String, java.lang.String, java.util.Map, long, int, int, int, long, int) - */ + @Override public void schedule(String poolName, String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime, int maxRetry) throws GenericServiceException { schedule(null, poolName, serviceName, context, startTime, frequency, interval, count, endTime, maxRetry); } + @Override public void schedule(String poolName, String serviceName, long startTime, int frequency, int interval, int count, long endTime, int maxRetry, Object... context) throws GenericServiceException { schedule(poolName, serviceName, ServiceUtil.makeContext(context), startTime, frequency, interval, count, endTime, maxRetry); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#schedule(java.lang.String, java.lang.String, java.lang.String, java.util.Map, long, int, int, int, long, int) - */ + @Override public void schedule(String jobName, String poolName, String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime, int maxRetry) throws GenericServiceException { Transaction suspendedTransaction = null; try { @@ -113,124 +110,109 @@ public abstract class GenericAbstractDis } } + @Override public void schedule(String jobName, String poolName, String serviceName, long startTime, int frequency, int interval, int count, long endTime, int maxRetry, Object... context) throws GenericServiceException { schedule(jobName, poolName, serviceName, ServiceUtil.makeContext(context), startTime, frequency, interval, count, endTime, maxRetry); } + @Override public void addRollbackService(String serviceName, Map<String, ? extends Object> context, boolean persist) throws GenericServiceException { ServiceSynchronization.registerRollbackService(this.getDispatchContext(), serviceName, null, context, true, persist); } + @Override public void addRollbackService(String serviceName, boolean persist, Object... context) throws GenericServiceException { addRollbackService(serviceName, ServiceUtil.makeContext(context), persist); } + @Override public void addCommitService(String serviceName, Map<String, ? extends Object> context, boolean persist) throws GenericServiceException { ServiceSynchronization.registerCommitService(this.getDispatchContext(), serviceName, null, context, true, persist); } + @Override public void addCommitService(String serviceName, boolean persist, Object... context) throws GenericServiceException { addCommitService(serviceName, ServiceUtil.makeContext(context), persist); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#schedule(java.lang.String, java.util.Map, long, int, int, int, long) - */ + @Override public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime) throws GenericServiceException { ModelService model = ctx.getModelService(serviceName); schedule(null, serviceName, context, startTime, frequency, interval, count, endTime, model.maxRetry); } + @Override public void schedule(String serviceName, long startTime, int frequency, int interval, int count, long endTime, Object... context) throws GenericServiceException { schedule(serviceName, ServiceUtil.makeContext(context), startTime, frequency, interval, count, endTime); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#schedule(java.lang.String, java.util.Map, long, int, int, int) - */ + @Override public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count) throws GenericServiceException { schedule(serviceName, context, startTime, frequency, interval, count, 0); } + @Override public void schedule(String serviceName, long startTime, int frequency, int interval, int count, Object... context) throws GenericServiceException { schedule(serviceName, ServiceUtil.makeContext(context), startTime, frequency, interval, count); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#schedule(java.lang.String, java.util.Map, long, int, int, long) - */ + @Override public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, long endTime) throws GenericServiceException { schedule(serviceName, context, startTime, frequency, interval, -1, endTime); } + @Override public void schedule(String serviceName, long startTime, int frequency, int interval, long endTime, Object... context) throws GenericServiceException { schedule(serviceName, ServiceUtil.makeContext(context), startTime, frequency, interval, endTime); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#schedule(java.lang.String, java.util.Map, long) - */ + @Override public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime) throws GenericServiceException { schedule(serviceName, context, startTime, RecurrenceRule.DAILY, 1, 1); } + @Override public void schedule(String serviceName, long startTime, Object... context) throws GenericServiceException { schedule(serviceName, ServiceUtil.makeContext(context), startTime); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#getJobManager() - */ + @Override public JobManager getJobManager() { return dispatcher.getJobManager(); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#getJMSListeneFactory() - */ + @Override public JmsListenerFactory getJMSListeneFactory() { return dispatcher.getJMSListenerFactory(); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#getDelegator() - */ + @Override public Delegator getDelegator() { return dispatcher.getDelegator(); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#getSecurity() - */ + @Override public Security getSecurity() { return dispatcher.getSecurity(); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#getName() - */ + @Override public String getName() { return this.name; } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#getDispatchContext() - */ + @Override public DispatchContext getDispatchContext() { return ctx; } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#deregister() - */ + @Override public void deregister() { ServiceContainer.removeFromCache(getName()); dispatcher.deregister(this); } - /** - * @see org.apache.ofbiz.service.LocalDispatcher#registerCallback(String, GenericServiceCallback) - */ + @Override public void registerCallback(String serviceName, GenericServiceCallback cb) { dispatcher.registerCallback(serviceName, cb); } |
Free forum by Nabble | Edit this page |