Author: doogie
Date: Sat Mar 21 23:22:45 2009 New Revision: 757065 URL: http://svn.apache.org/viewvc?rev=757065&view=rev Log: Fix purely empty whitespace lines, and remove trailing whitespace. Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/DelegatorInterface.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/EntityCryptoException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/EntityLockedException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericCreateException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDataSourceException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDuplicateKeyException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityConfException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityNotFoundException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericFindException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericModelException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericNoSuchEntityException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericNotImplementedException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericPK.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericRemoveException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericResultSetClosedException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericStoreException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValueHtmlWrapper.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractCache.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/Cache.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityCache.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityListCache.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityObjectCache.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityClause.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityCondition.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionFunction.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionList.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionListBase.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionParam.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionSubSelect.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionValue.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionVisitor.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityDateFilterCondition.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldMap.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFunction.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityJoinOperator.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityOperator.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityWhereString.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/OrderByItem.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/OrderByList.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DatasourceInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DelegatorInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityConfigUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityDataReaderInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityEcaReaderInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityGroupReaderInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityModelReaderInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/FieldTypeInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/NamedInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/ResourceInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/ResourceLoaderInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/MinervaConnectionFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/TyrexConnectionFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/connection/XaPoolConnectionFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericHelper.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericHelperDAO.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericHelperFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/MemoryHelper.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/eca/EntityEcaHandler.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/ByAndFinder.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/ByConditionFinder.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/Finder.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/ListFinder.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/PrimaryKeyFinder.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/AbstractCursorHandler.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/CursorConnection.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/CursorResultSet.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/CursorStatement.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/ExecQueryCallbackFunctionIF.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/SqlJdbcUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/DynamicViewEntity.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelChild.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelField.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldTypeReader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelGroupReader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelIndex.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelInfo.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelKeyMap.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelReader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelRelation.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/serialize/SerializeException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializable.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/DebugXaResource.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/DumbFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/GenericTransactionException.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/GenericXaResource.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/JNDIFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactoryInterface.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TyrexFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/ByteWrapper.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/CachedClassLoaderInit.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/DistributedCacheClear.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityCrypto.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityDataAssert.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityFindOptions.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityTypeUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/DelegatorInterface.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/DelegatorInterface.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/DelegatorInterface.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/DelegatorInterface.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -138,11 +138,11 @@ EntityListIterator find(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Set<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions) throws GenericEntityException; - - List<GenericValue> findList(String entityName, EntityCondition entityCondition, + + List<GenericValue> findList(String entityName, EntityCondition entityCondition, Set<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions, boolean useCache) throws GenericEntityException; - + int removeByAnd(String entityName, Object... fields) throws GenericEntityException; int removeByAnd(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException; Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/EntityCryptoException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/EntityCryptoException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/EntityCryptoException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/EntityCryptoException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/EntityLockedException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/EntityLockedException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/EntityLockedException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/EntityLockedException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericCreateException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericCreateException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericCreateException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericCreateException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDataSourceException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDataSourceException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDataSourceException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDataSourceException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -108,12 +108,12 @@ protected EntityEcaHandler<?> entityEcaHandler = null; protected SequenceUtil sequencer = null; protected EntityCrypto crypto = null; - + /** A ThreadLocal variable to allow other methods to specify a user identifier (usually the userLoginId, though technically the Entity Engine doesn't know anything about the UserLogin entity) */ protected static ThreadLocal<List<Object>> userIdentifierStack = new ThreadLocal<List<Object>>(); /** A ThreadLocal variable to allow other methods to specify a session identifier (usually the visitId, though technically the Entity Engine doesn't know anything about the Visit entity) */ protected static ThreadLocal<List<Object>> sessionIdentifierStack = new ThreadLocal<List<Object>>(); - + public static GenericDelegator getGenericDelegator(String delegatorName) { if (delegatorName == null) { @@ -153,7 +153,7 @@ } return curValList; } - + public static String getCurrentUserIdentifier() { List<Object> curValList = getUserIdentifierStack(); Object curVal = curValList.size() > 0 ? curValList.get(0) : null; @@ -163,7 +163,7 @@ return curVal.toString(); } } - + public static void pushUserIdentifier(String userIdentifier) { if (userIdentifier == null) { return; @@ -171,7 +171,7 @@ List<Object> curValList = getUserIdentifierStack(); curValList.add(0, userIdentifier); } - + public static String popUserIdentifier() { List<Object> curValList = getUserIdentifierStack(); if (curValList.size() == 0) { @@ -180,7 +180,7 @@ return (String) curValList.remove(0); } } - + public static void clearUserIdentifierStack() { List<Object> curValList = getUserIdentifierStack(); curValList.clear(); @@ -194,7 +194,7 @@ } return curValList; } - + public static String getCurrentSessionIdentifier() { List<Object> curValList = getSessionIdentifierStack(); Object curVal = curValList.size() > 0 ? curValList.get(0) : null; @@ -204,7 +204,7 @@ return curVal.toString(); } } - + public static void pushSessionIdentifier(String sessionIdentifier) { if (sessionIdentifier == null) { return; @@ -212,7 +212,7 @@ List<Object> curValList = getSessionIdentifierStack(); curValList.add(0, sessionIdentifier); } - + public static String popSessionIdentifier() { List<Object> curValList = getSessionIdentifierStack(); if (curValList.size() == 0) { @@ -221,7 +221,7 @@ return (String) curValList.remove(0); } } - + public static void clearSessionIdentifierStack() { List<Object> curValList = getSessionIdentifierStack(); curValList.clear(); @@ -348,7 +348,7 @@ public String getDelegatorName() { return this.delegatorName; } - + protected DelegatorInfo getDelegatorInfo() { if (this.delegatorInfo == null) { this.delegatorInfo = EntityConfigUtil.getDelegatorInfo(this.delegatorName); @@ -397,7 +397,7 @@ */ public Map<String, ModelEntity> getModelEntityMapByGroup(String groupName) throws GenericEntityException { Set<String> entityNameSet = getModelGroupReader().getEntityNamesByGroup(groupName); - + if (this.getDelegatorInfo().defaultGroupName.equals(groupName)) { // add all entities with no group name to the Set Set<String> allEntityNames = this.getModelReader().getEntityNames(); @@ -407,7 +407,7 @@ } } } - + Map<String, ModelEntity> entities = FastMap.newInstance(); if (entityNameSet == null || entityNameSet.size() == 0) { return entities; @@ -670,21 +670,21 @@ return this.create(value, true); } - /** Sets the sequenced ID (for entity with one primary key field ONLY), and then does a create in the database - * as normal. The reason to do it this way is that it will retry and fix the sequence if somehow the sequencer + /** Sets the sequenced ID (for entity with one primary key field ONLY), and then does a create in the database + * as normal. The reason to do it this way is that it will retry and fix the sequence if somehow the sequencer * is in a bad state and returning a value that already exists. *@param value The GenericValue to create a value in the datasource from *@return GenericValue instance containing the new instance */ public GenericValue createSetNextSeqId(GenericValue value) throws GenericEntityException { boolean doCacheClear = true; - + GenericHelper helper = getEntityHelper(value.getEntityName()); // just make sure it is this delegator... value.setDelegator(this); // this will throw an IllegalArgumentException if the entity for the value does not have one pk field, or if it already has a value set for the one pk field value.setNextSeqId(); - + boolean beganTransaction = false; try { if (alwaysUseTransaction) { @@ -707,7 +707,7 @@ if (value != null && value.getModelEntity().getHasFieldWithAuditLog()) { createEntityAuditLogAll(value, false, false); } - + try { value = helper.create(value); } catch (GenericEntityException e) { @@ -718,10 +718,10 @@ throw e; } else { Debug.logInfo("Error creating entity record with a sequenced value [" + value.getPrimaryKey() + "], trying again about to refresh bank for entity [" + value.getEntityName() + "]", module); - + // found an existing value... was probably a duplicate key, so clean things up and try again this.sequencer.forceBankRefresh(value.getEntityName(), 1); - + value.setNextSeqId(); value = helper.create(value); Debug.logInfo("Successfully created new entity record on retry with a sequenced value [" + value.getPrimaryKey() + "], after getting refreshed bank for entity [" + value.getEntityName() + "]", module); @@ -741,7 +741,7 @@ } ecaRunner.evalRules(EntityEcaHandler.EV_RETURN, EntityEcaHandler.OP_CREATE, value, false); - + return value; } catch (GenericEntityException e) { String errMsg = "Failure in create operation for entity [" + value.getEntityName() + "]: " + e.toString() + ". Rolling back transaction."; @@ -759,7 +759,7 @@ TransactionUtil.commit(beganTransaction); } } - + /** Creates a Entity in the form of a GenericValue and write it to the datasource *@param value The GenericValue to create a value in the datasource from *@param doCacheClear boolean that specifies whether or not to automatically clear cache entries related to this operation @@ -789,7 +789,7 @@ if (value != null && value.getModelEntity().getHasFieldWithAuditLog()) { createEntityAuditLogAll(value, false, false); } - + value = helper.create(value); if (value != null) { @@ -805,7 +805,7 @@ } ecaRunner.evalRules(EntityEcaHandler.EV_RETURN, EntityEcaHandler.OP_CREATE, value, false); - + return value; } catch (GenericEntityException e) { String errMsg = "Failure in create operation for entity [" + value.getEntityName() + "]: " + e.toString() + ". Rolling back transaction."; @@ -934,12 +934,12 @@ } ecaRunner.evalRules(EntityEcaHandler.EV_RUN, EntityEcaHandler.OP_REMOVE, primaryKey, false); - + // if audit log on for any fields, save old value before removing so it's still there if (primaryKey != null && primaryKey.getModelEntity().getHasFieldWithAuditLog()) { createEntityAuditLogAll(this.findOne(primaryKey.getEntityName(), primaryKey, false), true, true); } - + int num = helper.removeByPrimaryKey(primaryKey); this.saveEntitySyncRemoveInfo(primaryKey); @@ -995,17 +995,17 @@ } ecaRunner.evalRules(EntityEcaHandler.EV_RUN, EntityEcaHandler.OP_REMOVE, value, false); - + // if audit log on for any fields, save old value before actual remove if (value != null && value.getModelEntity().getHasFieldWithAuditLog()) { createEntityAuditLogAll(value, true, true); } - + int num = helper.removeByPrimaryKey(value.getPrimaryKey()); this.saveEntitySyncRemoveInfo(value.getPrimaryKey()); ecaRunner.evalRules(EntityEcaHandler.EV_RETURN, EntityEcaHandler.OP_REMOVE, value, false); - + return num; } catch (GenericEntityException e) { String errMsg = "Failure in removeValue operation for entity [" + value.getEntityName() + "]: " + e.toString() + ". Rolling back transaction."; @@ -1259,12 +1259,12 @@ ecaRunner.evalRules(EntityEcaHandler.EV_RUN, EntityEcaHandler.OP_STORE, value, false); this.encryptFields(value); - + // if audit log on for any fields, save old value before the update so we still have both if (value != null && value.getModelEntity().getHasFieldWithAuditLog()) { createEntityAuditLogAll(value, true, false); } - + int retVal = helper.store(value); // refresh the valueObject to get the new version @@ -1273,7 +1273,7 @@ } ecaRunner.evalRules(EntityEcaHandler.EV_RETURN, EntityEcaHandler.OP_STORE, value, false); - + return retVal; } catch (GenericEntityException e) { String errMsg = "Failure in store operation for entity [" + value.getEntityName() + "]: " + e.toString() + ". Rolling back transaction."; @@ -1511,7 +1511,7 @@ return value; } } - + boolean beganTransaction = false; try { if (alwaysUseTransaction) { @@ -1545,7 +1545,7 @@ this.putInPrimaryKeyCache(primaryKey, GenericValue.NULL_VALUE); } } - + ecaRunner.evalRules(EntityEcaHandler.EV_RETURN, EntityEcaHandler.OP_FIND, (value == null ? primaryKey : value), false); return value; } catch (GenericEntityException e) { @@ -2081,7 +2081,7 @@ return this.findList(entityName, ecl, null, orderBy, null, false); } - /** + /** * NOTE 20080502: 0 references *@deprecated Use findList() instead */ @@ -2097,7 +2097,7 @@ return this.findList(entityName, ecl, null, null, null, false); } - /** + /** * NOTE 20080502: 1 references; all changed to findList *@deprecated Use findList() instead */ @@ -2112,7 +2112,7 @@ return this.findList(entityName, ecl, null, null, null, false); } - /** + /** * NOTE 20080502: 1 references; all changed to findList *@deprecated Use findList() instead */ @@ -2287,10 +2287,10 @@ *@param findOptions An instance of EntityFindOptions that specifies advanced query options. See the EntityFindOptions JavaDoc for more details. *@return List of GenericValue objects representing the result */ - public List<GenericValue> findList(String entityName, EntityCondition entityCondition, + public List<GenericValue> findList(String entityName, EntityCondition entityCondition, Set<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions, boolean useCache) throws GenericEntityException { - + EntityEcaRuleRunner<?> ecaRunner = null; GenericValue dummyValue = null; if (useCache) { @@ -2298,13 +2298,13 @@ ModelEntity modelEntity = getModelReader().getModelEntity(entityName); dummyValue = GenericValue.create(modelEntity); ecaRunner.evalRules(EntityEcaHandler.EV_CACHE_CHECK, EntityEcaHandler.OP_FIND, dummyValue, false); - + List<GenericValue> cacheList = this.cache.get(entityName, entityCondition, orderBy); if (cacheList != null) { return cacheList; } } - + boolean beganTransaction = false; try { if (alwaysUseTransaction) { @@ -2315,7 +2315,7 @@ eli.setDelegator(this); List<GenericValue> list = eli.getCompleteList(); eli.close(); - + if (useCache) { ecaRunner.evalRules(EntityEcaHandler.EV_CACHE_PUT, EntityEcaHandler.OP_FIND, dummyValue, false); this.cache.put(entityName, entityCondition, orderBy, list); @@ -3079,7 +3079,7 @@ } } } - + // might be null, but will usually match the entity name ModelEntity seqModelEntity = this.getModelEntity(seqName); @@ -3204,7 +3204,7 @@ } } } - + public Object encryptFieldValue(String entityName, Object fieldValue) throws EntityCryptoException { if (fieldValue != null) { if (fieldValue instanceof String && UtilValidate.isEmpty((String) fieldValue)) { @@ -3226,7 +3226,7 @@ public void decryptFields(GenericEntity entity) throws GenericEntityException { ModelEntity model = entity.getModelEntity(); String entityName = model.getEntityName(); - + Iterator<ModelField> i = model.getFieldsIterator(); while (i.hasNext()) { ModelField field = i.next(); @@ -3272,24 +3272,24 @@ } } } - + protected void createEntityAuditLogSingle(GenericValue value, ModelField mf, boolean isUpdate, boolean isRemove) throws GenericEntityException { if (value == null || mf == null || !mf.getEnableAuditLog()) { return; } - + GenericValue entityAuditLog = this.makeValue("EntityAuditLog"); entityAuditLog.set("auditHistorySeqId", this.getNextSeqId("EntityAuditLog")); entityAuditLog.set("changedEntityName", value.getEntityName()); entityAuditLog.set("changedFieldName", mf.getName()); - + String pkCombinedValueText = value.getPkShortValueString(); if (pkCombinedValueText.length() > 250) { // uh-oh, the string is too long! pkCombinedValueText = pkCombinedValueText.substring(0, 250); } entityAuditLog.set("pkCombinedValueText", pkCombinedValueText); - + GenericValue oldGv = null; if (isUpdate) { // it's an update, get it from the database @@ -3303,7 +3303,7 @@ } } else { // lookup old value - String oldValueText = null; + String oldValueText = null; Object oldValue = oldGv.get(mf.getName()); if (oldValue != null) { oldValueText = oldValue.toString(); @@ -3313,7 +3313,7 @@ } entityAuditLog.set("oldValueText", oldValueText); } - + if (!isRemove) { String newValueText = null; Object newValue = value.get(mf.getName()); @@ -3329,7 +3329,7 @@ entityAuditLog.set("changedDate", UtilDateTime.nowTimestamp()); entityAuditLog.set("changedByInfo", getCurrentUserIdentifier()); entityAuditLog.set("changedSessionInfo", getCurrentSessionIdentifier()); - + this.create(entityAuditLog); } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDuplicateKeyException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDuplicateKeyException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDuplicateKeyException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDuplicateKeyException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -102,16 +102,16 @@ /** This is an internal field used to specify that a value has come from a sync process and that the auto-stamps should not be over-written */ protected boolean isFromEntitySync = false; - + /** Creates new GenericEntity - Should never be used, prefer the other options. */ protected GenericEntity() { } - + /** Creates new GenericEntity */ public static GenericEntity createGenericEntity(ModelEntity modelEntity) { if (modelEntity == null) { throw new IllegalArgumentException("Cannot create a GenericEntity with a null modelEntity parameter"); } - + GenericEntity newEntity = new GenericEntity(); newEntity.init(modelEntity); return newEntity; @@ -122,7 +122,7 @@ if (modelEntity == null) { throw new IllegalArgumentException("Cannot create a GenericEntity with a null modelEntity parameter"); } - + GenericEntity newEntity = new GenericEntity(); newEntity.init(modelEntity, fields); return newEntity; @@ -133,7 +133,7 @@ if (value == null) { throw new IllegalArgumentException("Cannot create a GenericEntity with a null value parameter"); } - + GenericEntity newEntity = new GenericEntity(); newEntity.init(value); return newEntity; @@ -146,7 +146,7 @@ } this.modelEntity = modelEntity; this.entityName = modelEntity.getEntityName(); - + // check some things if (this.entityName == null) { throw new IllegalArgumentException("Cannot create a GenericEntity with a null entityName in the modelEntity parameter"); @@ -161,7 +161,7 @@ this.modelEntity = modelEntity; this.entityName = modelEntity.getEntityName(); setFields(fields); - + // check some things if (this.entityName == null) { throw new IllegalArgumentException("Cannot create a GenericEntity with a null entityName in the modelEntity parameter"); @@ -179,7 +179,7 @@ this.modelEntity = modelEntity; this.entityName = modelEntity.getEntityName(); set(modelEntity.getOnlyPk().getName(), singlePkValue); - + // check some things if (this.entityName == null) { throw new IllegalArgumentException("Cannot create a GenericEntity with a null entityName in the modelEntity parameter"); @@ -213,7 +213,7 @@ this.mutable = true; this.isFromEntitySync = false; } - + public void refreshFromValue(GenericEntity newValue) throws GenericEntityException { if (newValue == null) { throw new GenericEntityException("Could not refresh value, new value not found for: " + this); @@ -264,7 +264,7 @@ public void setIsFromEntitySync(boolean isFromEntitySync) { this.isFromEntitySync = isFromEntitySync; } - + public String getEntityName() { return entityName; } @@ -342,7 +342,7 @@ } return true; } - + public String getPkShortValueString() { StringBuffer sb = new StringBuffer(); for (ModelField curPk: this.getModelEntity().getPkFieldsUnmodifiable()) { @@ -442,13 +442,13 @@ set(name, null); return; } - + boolean isNullString = false; if ("null".equals(value)) { // count this as a null too, but only for numbers and stuff, not for Strings isNullString = true; } - + ModelField field = getModelEntity().getField(name); if (field == null) set(name, value); // this will get an error in the set() method... @@ -538,18 +538,18 @@ public void setBytes(String name, byte[] bytes) { this.set(name, bytes); } - + public void setNextSeqId() { List<String> pkFieldNameList = this.modelEntity.getPkFieldNames(); if (pkFieldNameList.size() != 1) { throw new IllegalArgumentException("Cannot setNextSeqId for entity [" + this.getEntityName() + "] that does not have a single primary key field, instead has [" + pkFieldNameList.size() + "]"); } - + String pkFieldName = pkFieldNameList.get(0); if (this.get(pkFieldName) != null) { // don't throw exception, too much of a pain and usually intended: throw new IllegalArgumentException("Cannot setNextSeqId, pk field [" + pkFieldName + "] of entity [" + this.getEntityName() + "] already has a value [" + this.get(pkFieldName) + "]"); } - + String sequencedValue = this.getDelegator().getNextSeqId(this.getEntityName()); this.set(pkFieldName, sequencedValue); } @@ -705,14 +705,14 @@ } fieldValue = null; } - + // In case of view entity try to retrieve the field heading from the real entity linked to the view ModelEntity modelEntityToUse = this.getModelEntity(); if (modelEntityToUse instanceof ModelViewEntity) { ModelViewEntity modelViewEntity = (ModelViewEntity) modelEntityToUse; Iterator<ModelAlias> it = modelViewEntity.getAliasesIterator(); while (it.hasNext()) { - ModelAlias modelAlias = it.next(); + ModelAlias modelAlias = it.next(); if (modelAlias.getName().equalsIgnoreCase(name)) { modelEntityToUse = modelViewEntity.getMemberModelEntity(modelAlias.getEntityAlias()); name = modelAlias.getField(); @@ -803,8 +803,8 @@ public void setNonPKFields(Map<? extends Object, ? extends Object> fields, boolean setIfEmpty) { setAllFields(fields, setIfEmpty, null, Boolean.FALSE); } - - + + /** Intelligently sets fields on this entity from the Map of fields passed in * @param fields The fields Map to get the values from * @param setIfEmpty Used to specify whether empty/null values in the field Map should over-write non-empty values in this entity @@ -825,7 +825,7 @@ } else { iter = this.getModelEntity().getFieldsIterator(); } - + while (iter != null && iter.hasNext()) { ModelField curField = iter.next(); String fieldName = curField.getName(); @@ -835,7 +835,7 @@ } else { sourceFieldName = curField.getName(); } - + if (fields.containsKey(sourceFieldName)) { Object field = fields.get(sourceFieldName); @@ -1017,7 +1017,7 @@ while (modelFields.hasNext()) { ModelField modelField = modelFields.next(); String name = modelField.getName(); - + String type = modelField.getType(); if (type != null && type.equals("blob")) { Object obj = get(name); @@ -1031,11 +1031,11 @@ } } else { String valueStr = this.getString(name); - + if (valueStr != null) { StringBuilder value = new StringBuilder(valueStr); boolean needsCdata = false; - + // check each character, if line-feed or carriage-return is found set needsCdata to true; also look for invalid characters for (int i = 0; i < value.length(); i++) { char curChar = value.charAt(i); @@ -1047,9 +1047,9 @@ 22 = – 23 = - 25 = tm - * - */ - + * + */ + switch (curChar) { case '\'': value.replace(i, i+1, "'"); @@ -1101,7 +1101,7 @@ // if it is less that 0x20 at this point it is invalid because the only valid values < 0x20 are 0x9, 0xA, 0xD as caught above Debug.logInfo("Removing invalid character [" + curChar + "] numeric value [" + (int) curChar + "] for field " + name + " of entity with PK: " + this.getPrimaryKey().toString(), module); value.deleteCharAt(i); - } else if (curChar > 0x7F) { + } else if (curChar > 0x7F) { // Replace each char which is out of the ASCII range with a XML entity String replacement = "&#" + (int) curChar + ";"; if (Debug.verboseOn()) { @@ -1111,7 +1111,7 @@ } } } - + if (needsCdata) { // use valueStr instead of the escaped value, not needed or wanted in a CDATA block cdataMap.put(name, valueStr); @@ -1373,7 +1373,7 @@ public static class NullGenericEntity extends GenericEntity implements NULL { protected NullGenericEntity() { } - + public String getEntityName() { return "[null-entity]"; } @@ -1381,10 +1381,10 @@ return "[null-entity]"; } } - + public static class NullField implements NULL, Comparable<NullField> { protected NullField() { } - + public String toString() { return "[null-field]"; } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityConfException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityConfException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityConfException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityConfException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -31,7 +31,7 @@ } public GenericEntityException(Throwable nested) { - super(nested); + super(nested); } public GenericEntityException(String str) { Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityNotFoundException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityNotFoundException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityNotFoundException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntityNotFoundException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericFindException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericFindException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericFindException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericFindException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericModelException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericModelException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericModelException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericModelException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericNoSuchEntityException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericNoSuchEntityException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericNoSuchEntityException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericNoSuchEntityException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericNotImplementedException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericNotImplementedException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericNotImplementedException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericNotImplementedException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericPK.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericPK.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericPK.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericPK.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -35,9 +35,9 @@ return new GenericPK(); } }; - + protected GenericPK() { } - + /** Creates new GenericPK */ public static GenericPK create(ModelEntity modelEntity) { GenericPK newPK = genericPKFactory.object(); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericRemoveException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericRemoveException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericRemoveException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericRemoveException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericResultSetClosedException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericResultSetClosedException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericResultSetClosedException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericResultSetClosedException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericStoreException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericStoreException.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericStoreException.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericStoreException.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -53,7 +53,7 @@ return new GenericValue(); } }; - + /** Map to cache various related entity collections */ public transient Map<String, List<GenericValue>> relatedCache = null; @@ -102,7 +102,7 @@ newValue.init(primaryKey); return newValue; } - + public void reset() { // from GenericEntity super.reset(); @@ -441,7 +441,7 @@ while (relItr.hasNext()) { ModelRelation relation = relItr.next(); if ("one".equalsIgnoreCase(relation.getType())) { - // see if the related value exists + // see if the related value exists Map<String, Object> fields = FastMap.newInstance(); for (int i = 0; i < relation.getKeyMapsSize(); i++) { ModelKeyMap keyMap = relation.getKeyMap(i); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValueHtmlWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValueHtmlWrapper.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValueHtmlWrapper.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValueHtmlWrapper.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -44,7 +44,7 @@ return new GenericValueHtmlWrapper(); } }; - + /** Creates new GenericValueHtmlWrapper from existing GenericValue */ public static GenericValueHtmlWrapper create(GenericValue value) { GenericValueHtmlWrapper newValue = genericValueHtmlWrapperFactory.object(); @@ -57,7 +57,7 @@ return newValue; } - /* NOTE: this is NOT used because there are certain FTL files that call services and things, and this messes those up, so only overriding the Map.get(Object) method to get use of this as a Map + /* NOTE: this is NOT used because there are certain FTL files that call services and things, and this messes those up, so only overriding the Map.get(Object) method to get use of this as a Map * Override the basic get method, which all other get methods call so we only need to do this one (though most important for the Map.get(Object) and the getString() methods public Object get(String name) { Object value = super.get(name); @@ -76,13 +76,13 @@ return value; } } - + // another experimental object, this one specifically for FTL public static class GenericValueHtmlWrapperForFtl extends MapModel { public GenericValueHtmlWrapperForFtl(GenericValue gv, BeansWrapper wrapper) { super(gv, wrapper); } - + public TemplateModel get(String key) { TemplateModel tm = null; try { Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractCache.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractCache.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractCache.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractCache.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/AbstractEntityConditionCache.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -50,12 +50,12 @@ } protected V put(String entityName, EntityCondition condition, K key, V value) { - ModelEntity entity = this.getDelegator().getModelEntity(entityName); + ModelEntity entity = this.getDelegator().getModelEntity(entityName); if (entity.getNeverCache()) { Debug.logWarning("Tried to put a value of the " + entityName + " entity in the cache but this entity has never-cache set to true, not caching.", module); return null; } - + Map<K, V> conditionCache = getOrCreateConditionCache(entityName, condition); synchronized (conditionCache) { return conditionCache.put(key, value); @@ -136,13 +136,13 @@ } // if oldValue == null, then this is a new entity - // if newValue == null, then + // if newValue == null, then public void storeHook(GenericEntity oldEntity, GenericEntity newEntity) { storeHook(false, oldEntity, newEntity); } // if oldValue == null, then this is a new entity - // if newValue == null, then + // if newValue == null, then public void storeHook(GenericPK oldPK, GenericEntity newEntity) { storeHook(true, oldPK, newEntity); } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/Cache.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/Cache.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/Cache.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/Cache.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -82,7 +82,7 @@ } return oldEntity; } - + public GenericValue put(GenericPK pk, GenericValue entity) { GenericValue oldEntity = entityCache.put(pk, entity); if (pk.getModelEntity().getAutoClearCache()) { Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityCache.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityCache.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityCache.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityCache.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityListCache.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityListCache.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityListCache.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityListCache.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -47,7 +47,7 @@ // the valueList was not found for the given ordering, so grab the first one and order it in memory Iterator<List<GenericValue>> it = conditionCache.values().iterator(); if (it.hasNext()) valueList = it.next(); - + synchronized (conditionCache) { if (valueList != null) { valueList = EntityUtil.orderBy(valueList, orderBy); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityObjectCache.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityObjectCache.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityObjectCache.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityObjectCache.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityClause.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityClause.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityClause.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityClause.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -43,7 +43,7 @@ * Encapsulates operations between entities and entity fields. This is a immutable class. */ public class EntityComparisonOperator extends EntityOperator<Boolean> { - + public static final String module = EntityComparisonOperator.class.getName(); protected static PatternMatcher matcher = new Perl5Matcher(); @@ -86,13 +86,13 @@ public void addSqlValue(StringBuilder sql, ModelEntity entity, List<EntityConditionParam> entityConditionParams, boolean compat, Object lhs, Object rhs, DatasourceInfo datasourceInfo) { //Debug.logInfo("EntityComparisonOperator.addSqlValue field=" + lhs + ", value=" + rhs + ", value type=" + (rhs == null ? "null object" : rhs.getClass().getName()), module); - + // if this is an IN operator and the rhs Object isEmpty, add "1=0" instead of the normal SQL. Note that "FALSE" does not work with all databases. if (this.idInt == EntityOperator.ID_IN && UtilValidate.isEmpty(rhs)) { sql.append("1=0"); return; } - + ModelField field; if (lhs instanceof EntityConditionValue) { EntityConditionValue ecv = (EntityConditionValue) lhs; @@ -126,7 +126,7 @@ addValue(sql, field, rhs, entityConditionParams); } } - + public boolean compare(Comparable lhs, Object rhs) { throw new UnsupportedOperationException(codeString); } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityCondition.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityCondition.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityCondition.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -43,7 +43,7 @@ * */ public abstract class EntityCondition extends EntityConditionBase implements Reusable { - + public static EntityExpr makeCondition(Object lhs, EntityComparisonOperator operator, Object rhs) { EntityExpr expr = EntityExpr.entityExprFactory.object(); expr.init(lhs, operator, rhs); @@ -148,7 +148,7 @@ public boolean entityMatches(GenericEntity entity) { return mapMatches(entity.getDelegator(), entity); - } + } public Boolean eval(GenericEntity entity) { return eval(entity.getDelegator(), entity); @@ -163,7 +163,7 @@ abstract public EntityCondition freeze(); abstract public void encryptConditionFields(ModelEntity modelEntity, GenericDelegator delegator); - + public void visit(EntityConditionVisitor visitor) { throw new IllegalArgumentException(getClass().getName() + ".visit not implemented"); } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBase.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -77,7 +77,7 @@ protected String getColName(Map<String, String> tableAliases, ModelEntity modelEntity, ModelField modelField, String fieldName, boolean includeTableNamePrefix, DatasourceInfo datasourceInfo) { if (modelEntity == null || modelField == null) return fieldName; - // if this is a view entity and we are configured to alias the views, use the alias here instead of the composite (ie table.column) field name + // if this is a view entity and we are configured to alias the views, use the alias here instead of the composite (ie table.column) field name if (datasourceInfo != null && datasourceInfo.aliasViews && modelEntity instanceof ModelViewEntity) { ModelViewEntity modelViewEntity = (ModelViewEntity) modelEntity; ModelAlias modelAlias = modelViewEntity.getAlias(fieldName); @@ -85,7 +85,7 @@ return modelAlias.getColAlias(); } } - + String colName = getColName(modelField, fieldName); if (includeTableNamePrefix && datasourceInfo != null) { String tableName = modelEntity.getTableName(datasourceInfo); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionFunction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionFunction.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionFunction.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionFunction.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -55,7 +55,7 @@ protected EntityConditionFunction(int id, String code, EntityCondition condition) { init(id, code, condition); } - + public void init(int id, String code, EntityCondition condition) { idInt = id; codeString = code; Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionList.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionList.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionList.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionList.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -35,7 +35,7 @@ return new EntityConditionList(); } }; - + protected EntityConditionList() { super(); } @@ -49,15 +49,15 @@ public EntityConditionList(List<T> conditionList, EntityJoinOperator operator) { init(conditionList, operator); } - + public int getConditionListSize() { return super.getConditionListSize(); } - + public Iterator<T> getConditionIterator() { return super.getConditionIterator(); } - + public void accept(EntityConditionVisitor visitor) { visitor.acceptEntityConditionList(this); } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionListBase.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionListBase.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionListBase.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionListBase.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -66,19 +66,19 @@ public EntityOperator getOperator() { return this.operator; } - + public T getCondition(int index) { return this.conditionList.get(index); } - + protected int getConditionListSize() { return this.conditionList.size(); } - + protected Iterator<T> getConditionIterator() { return this.conditionList.iterator(); } - + public void visit(EntityConditionVisitor visitor) { visitor.acceptEntityJoinOperator(operator, conditionList); } @@ -108,14 +108,14 @@ cond.encryptConditionFields(modelEntity, delegator); } } - + public boolean equals(Object obj) { if (!(obj instanceof EntityConditionListBase)) return false; EntityConditionListBase other = (EntityConditionListBase) obj; - + boolean isEqual = conditionList.equals(other.conditionList) && operator.equals(other.operator); //if (!isEqual) { - // Debug.logWarning("EntityConditionListBase.equals is false:\n this.operator=" + this.operator + "; other.operator=" + other.operator + + // Debug.logWarning("EntityConditionListBase.equals is false:\n this.operator=" + this.operator + "; other.operator=" + other.operator + // "\nthis.conditionList=" + this.conditionList + // "\nother.conditionList=" + other.conditionList, module); //} Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionParam.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionParam.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionParam.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionParam.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionSubSelect.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionSubSelect.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionSubSelect.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionSubSelect.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -38,9 +38,9 @@ protected String keyFieldName = null; protected EntityCondition whereCond = null; protected Boolean requireAll = null; - + protected EntityConditionSubSelect() { } - + public EntityConditionSubSelect(String entityName, String keyFieldName, EntityCondition whereCond, boolean requireAll, GenericDelegator delegator) { this(delegator.getModelEntity(entityName), keyFieldName, whereCond, requireAll); } @@ -101,7 +101,7 @@ } catch (GenericEntityException e) { String errMsg = "Could not generate sub-select SQL: " + e.toString(); Debug.logError(e, errMsg, module); - + } } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionValue.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionValue.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionValue.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionValue.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -67,7 +67,7 @@ public void toString(StringBuilder sb) { addSqlValue(sb, null, new ArrayList<EntityConditionParam>(), false, null); } - + public String toString() { StringBuilder sql = new StringBuilder(); toString(sql); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionVisitor.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionVisitor.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionVisitor.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionVisitor.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityDateFilterCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityDateFilterCondition.java?rev=757065&r1=757064&r2=757065&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityDateFilterCondition.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityDateFilterCondition.java Sat Mar 21 23:22:45 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -37,17 +37,17 @@ return new EntityDateFilterCondition(); } }; - + protected String fromDateName = null; protected String thruDateName = null; protected EntityDateFilterCondition() {} - + /** @deprecated Use EntityCondition.makeConditionDate() instead */ public EntityDateFilterCondition(String fromDateName, String thruDateName) { init(fromDateName, thruDateName); } - + public void init(String fromDateName, String thruDateName) { this.fromDateName = fromDateName; this.thruDateName = thruDateName; @@ -57,7 +57,7 @@ this.fromDateName = null; this.thruDateName = null; } - + public String makeWhereString(ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, DatasourceInfo datasourceInfo) { EntityCondition condition = makeCondition(); return condition.makeWhereString(modelEntity, entityConditionParams, datasourceInfo); @@ -68,7 +68,7 @@ condition.checkCondition(modelEntity); } - public boolean mapMatches(GenericDelegator delegator, Map<String, ? extends Object> map) { + public boolean mapMatches(GenericDelegator delegator, Map<String, ? extends Object> map) { EntityCondition condition = makeCondition(); return condition.mapMatches(delegator, map); } |
Free forum by Nabble | Edit this page |