Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java Sun Jul 5 10:01:19 2009 @@ -63,6 +63,7 @@ public static UtilCache<String, Interpreter.ParsedScript> parsedScripts = new UtilCache<String, Interpreter.ParsedScript>("script.BshBsfParsedCache", 0, 0, false); + @Override public void initialize(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException { super.initialize(mgr, lang, declaredBeans); @@ -135,6 +136,7 @@ * It exectutes the funcBody text in an "anonymous" method call with * arguments. */ + @Override public Object apply(String source, int lineNo, int columnNo, Object funcBody, Vector namesVec, Vector argsVec) throws BSFException { if (namesVec.size() != argsVec.size()) throw new BSFException("number of params/names mismatch"); if (!(funcBody instanceof String)) throw new BSFException("apply: function body must be a string"); @@ -199,6 +201,7 @@ } + @Override public void exec(String source, int lineNo, int columnNo, Object script) throws BSFException { eval(source, lineNo, columnNo, script); } @@ -216,6 +219,7 @@ Object script, CodeBuffer cb) throws BSFException; */ + @Override public void declareBean(BSFDeclaredBean bean) throws BSFException { try { interpreter.set(bean.name, bean.bean); @@ -224,6 +228,7 @@ } } + @Override public void undeclareBean(BSFDeclaredBean bean) throws BSFException { try { interpreter.unset(bean.name); @@ -232,6 +237,7 @@ } } + @Override public void terminate() { } private String sourceInfo(String source, int lineNo, int columnNo) { Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OutputStreamByteCount.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OutputStreamByteCount.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OutputStreamByteCount.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OutputStreamByteCount.java Sun Jul 5 10:01:19 2009 @@ -23,11 +23,13 @@ /** @deprecated */ +@Deprecated public class OutputStreamByteCount extends OutputStream { protected long byteCount = 0; /** @deprecated */ + @Deprecated public OutputStreamByteCount() { super(); } @@ -35,14 +37,17 @@ /** * @see java.io.OutputStream#write(int) */ + @Override public void write(int arg0) throws IOException { byteCount++; } + @Override public void write(byte[] b) throws IOException { byteCount += b.length; } + @Override public void write(byte[] b, int off, int len) throws IOException { byteCount += len; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java Sun Jul 5 10:01:19 2009 @@ -600,6 +600,7 @@ * * @deprecated Use StringUtil.htmlEncoder instead. */ + @Deprecated public static String htmlSpecialChars(String html, boolean doubleQuotes, boolean singleQuotes, boolean insertBR) { html = StringUtil.replaceString(html, "&", "&"); html = StringUtil.replaceString(html, "<", "<"); @@ -698,6 +699,7 @@ /** * @return The String this object wraps. */ + @Override public String toString() { return this.theString; } @@ -709,6 +711,7 @@ */ public static class HtmlEncodingMapWrapper<K> implements Map<K, Object>, Reusable { protected static final ObjectFactory<HtmlEncodingMapWrapper<?>> mapStackFactory = new ObjectFactory<HtmlEncodingMapWrapper<?>>() { + @Override protected HtmlEncodingMapWrapper<?> create() { return new HtmlEncodingMapWrapper(); } @@ -758,6 +761,7 @@ public Set<K> keySet() { return this.internalMap.keySet(); } public Collection<Object> values() { return this.internalMap.values(); } public Set<Map.Entry<K, Object>> entrySet() { return this.internalMap.entrySet(); } + @Override public String toString() { return this.internalMap.toString(); } } } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java Sun Jul 5 10:01:19 2009 @@ -67,6 +67,7 @@ this.set(cal1, cal2); } + @Override public boolean equals(Object obj) { if (obj == this) { return true; @@ -80,6 +81,7 @@ return false; } + @Override public String toString() { return this.years + ":" + this.months + ":" + this.days + ":" + this.hours + ":" + this.minutes + ":" + this.seconds + ":" + this.millis; } @@ -282,6 +284,7 @@ protected static class NullDuration extends TimeDuration { protected NullDuration() {} + @Override public Calendar addToCalendar(Calendar cal) { return cal; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java Sun Jul 5 10:01:19 2009 @@ -911,6 +911,7 @@ } } + @Override public String toString() { if (realMapIfNeeded != null) { return realMapIfNeeded.toString(); @@ -929,6 +930,7 @@ } } + @Override public int hashCode() { if (realMapIfNeeded != null) { return realMapIfNeeded.hashCode(); @@ -944,6 +946,7 @@ } } + @Override public boolean equals(Object obj) { if (realMapIfNeeded != null) { return realMapIfNeeded.equals(obj); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java Sun Jul 5 10:01:19 2009 @@ -21,9 +21,11 @@ import java.math.BigDecimal; /** @deprecated */ +@Deprecated public class UtilParse { /** @deprecated */ + @Deprecated public static BigDecimal parseBigDecimalForEntity(String bigDecimalString) throws NumberFormatException { if (bigDecimalString == null) { return null; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java Sun Jul 5 10:01:19 2009 @@ -874,22 +874,27 @@ return bundle; } + @Override public int hashCode() { return this.hashCode; } + @Override public boolean equals(Object obj) { return obj == null ? false : obj.hashCode() == this.hashCode; } + @Override public Locale getLocale() { return this.locale; } + @Override protected Object handleGetObject(String key) { return properties.get(key); } + @Override public Enumeration<String> getKeys() { return new Enumeration<String>() { Iterator i = properties.keySet().iterator(); @@ -924,6 +929,7 @@ } in.close(); } + @Override public void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException { xmlToProperties(in, null, this); in.close(); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java Sun Jul 5 10:01:19 2009 @@ -278,7 +278,7 @@ /** * @deprecated Use <a href="#writeXmlDocument(org.w3c.dom.Node,%20java.io.OutputStream,%20java.lang.String,%20boolean,%20boolean,%20int)">writeXmlDocument(Node node, OutputStream os, String encoding, boolean omitXmlDeclaration, boolean indent, int indentAmount)</a> */ - @SuppressWarnings("deprecation") + @Deprecated public static void writeXmlDocument(OutputStream os, Element element, OutputFormat format) throws java.io.IOException { if (element == null) { Debug.logWarning("[UtilXml.writeXmlDocument] Element was null, doing nothing", module); @@ -353,6 +353,7 @@ /** * @deprecated */ + @Deprecated public static Document readXmlDocument(InputStream is) throws SAXException, ParserConfigurationException, java.io.IOException { return readXmlDocument(is, true, null); @@ -468,41 +469,49 @@ } } + @Override public void startGeneralEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException { super.startGeneralEntity(name, identifier, encoding, augs); setLineColumn(); } + @Override public void comment(XMLString text, Augmentations augs) throws XNIException { super.comment(text, augs); setLastChildLineColumn(); } + @Override public void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException { super.processingInstruction(target, data, augs); setLastChildLineColumn(); } + @Override public void startDocument(XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs) throws XNIException { super.startDocument(locator, encoding, namespaceContext, augs); this.locator = locator; setLineColumn(); } + @Override public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs) throws XNIException { super.doctypeDecl(rootElement, publicId, systemId, augs); } + @Override public void startElement(QName elementQName, XMLAttributes attrList, Augmentations augs) throws XNIException { super.startElement(elementQName, attrList, augs); setLineColumn(); } + @Override public void characters(XMLString text, Augmentations augs) throws XNIException { super.characters(text, augs); setLastChildLineColumn(); } + @Override public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException { super.ignorableWhitespace(text, augs); setLastChildLineColumn(); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheSoftReference.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheSoftReference.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheSoftReference.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheSoftReference.java Sun Jul 5 10:01:19 2009 @@ -36,6 +36,7 @@ super(o, referenceQueue); } + @Override public void clear() { if (Debug.verboseOn()) { Debug.logVerbose(new Exception("UtilCache.CacheSoftRef.clear()"), "Clearing UtilCache SoftReference - " + get(), module); @@ -43,6 +44,7 @@ super.clear(); } + @Override public void finalize() throws Throwable { if (Debug.verboseOn()) { Debug.logVerbose(new Exception("UtilCache.CacheSoftRef.finalize()"), "Finalize UtilCache SoftReference - " + get(), module); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/HardRefCacheLine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/HardRefCacheLine.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/HardRefCacheLine.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/HardRefCacheLine.java Sun Jul 5 10:01:19 2009 @@ -31,10 +31,12 @@ this.value = value; } + @Override public V getValue() { return value; } + @Override public boolean isInvalid() { return value == null; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/SoftRefCacheLine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/SoftRefCacheLine.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/SoftRefCacheLine.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/SoftRefCacheLine.java Sun Jul 5 10:01:19 2009 @@ -31,10 +31,12 @@ this.ref = new CacheSoftReference<V>(value); } + @Override public V getValue() { return ref.get(); } + @Override public boolean isInvalid() { return ref.get() == null; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java Sun Jul 5 10:01:19 2009 @@ -196,6 +196,7 @@ return expression; } + @Override public String toString() { if (this.isEmpty()) { return super.toString(); @@ -203,6 +204,7 @@ return this.original; } + @Override @SuppressWarnings("unchecked") public boolean equals(Object obj) { if (this == obj) { @@ -218,6 +220,7 @@ return false; } + @Override public int hashCode() { return this.original == null ? super.hashCode() : this.original.hashCode(); } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleServletAccessor.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleServletAccessor.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleServletAccessor.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleServletAccessor.java Sun Jul 5 10:01:19 2009 @@ -158,6 +158,7 @@ /** The equals and hashCode methods are imnplemented just case this object is ever accidently used as a Map key * * @return the hashcode */ + @Override public int hashCode() { return this.name.hashCode(); } @@ -166,6 +167,7 @@ * @param obj * @return whether this object is equal to the passed object */ + @Override public boolean equals(Object obj) { if (obj instanceof FlexibleServletAccessor) { FlexibleServletAccessor flexibleServletAccessor = (FlexibleServletAccessor) obj; @@ -185,6 +187,7 @@ /** To be used for a string representation of the accessor, returns the original name. * @return the name of this accessor */ + @Override public String toString() { return this.name; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LRUMap.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LRUMap.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LRUMap.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LRUMap.java Sun Jul 5 10:01:19 2009 @@ -54,6 +54,7 @@ this.maxSize = size; } + @Override protected boolean removeEldestEntry(Map.Entry<K, V> entry) { return size() > maxSize; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LifoSet.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LifoSet.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LifoSet.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LifoSet.java Sun Jul 5 10:01:19 2009 @@ -63,6 +63,7 @@ /** * @see java.util.Collection#size() */ + @Override public int size() { return backedList.size(); } @@ -70,6 +71,7 @@ /** * @see java.util.Collection#add(java.lang.Object) */ + @Override public boolean add(V obj) { int index = backedList.indexOf(obj); @@ -87,6 +89,7 @@ /** * @see java.util.Collection#iterator() */ + @Override public Iterator<V> iterator() { return backedList.iterator(); } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapComparator.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapComparator.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapComparator.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapComparator.java Sun Jul 5 10:01:19 2009 @@ -47,6 +47,7 @@ /** * @see java.lang.Object#equals(java.lang.Object) */ + @Override public boolean equals(Object obj) { return obj.equals(this); } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapStack.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapStack.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapStack.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapStack.java Sun Jul 5 10:01:19 2009 @@ -44,6 +44,7 @@ public static final String module = MapStack.class.getName(); protected static final ObjectFactory<MapStack<?>> mapStackFactory = new ObjectFactory<MapStack<?>>() { + @Override protected MapStack<?> create() { return new MapStack(); } @@ -335,6 +336,7 @@ return Collections.unmodifiableSet(resultEntrySet); } + @Override public String toString() { StringBuilder fullMapString = new StringBuilder(); int curLevel = 0; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/JuelConnector.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/JuelConnector.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/JuelConnector.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/JuelConnector.java Sun Jul 5 10:01:19 2009 @@ -57,6 +57,7 @@ public ExtendedAstBracket(AstNode base, AstNode property, boolean lvalue, boolean strict) { super(base, property, lvalue, strict); } + @Override public void setValue(Bindings bindings, ELContext context, Object value) throws ELException { if (!lvalue) { throw new ELException(LocalMessages.get("error.value.set.rvalue")); @@ -90,6 +91,7 @@ public ExtendedAstDot(AstNode base, String property, boolean lvalue) { super(base, property, lvalue); } + @Override public void setValue(Bindings bindings, ELContext context, Object value) throws ELException { if (!lvalue) { throw new ELException(LocalMessages.get("error.value.set.rvalue")); @@ -121,6 +123,7 @@ public ExtendedParser(Builder context, String input) { super(context, input); } + @Override protected AstEval eval(boolean required, boolean deferred) throws ScanException, ParseException { AstEval v = null; Symbol start_eval = deferred ? START_EVAL_DEFERRED : START_EVAL_DYNAMIC; @@ -146,9 +149,11 @@ } return v; } + @Override protected AstBracket createAstBracket(AstNode base, AstNode property, boolean lvalue, boolean strict) { return new ExtendedAstBracket(base, property, lvalue, strict); } + @Override protected AstDot createAstDot(AstNode base, String property, boolean lvalue) { return new ExtendedAstDot(base, property, lvalue); } @@ -157,6 +162,7 @@ /** Custom <code>Builder</code> class needed to implement a custom parser. */ @SuppressWarnings("serial") protected static class ExtendedBuilder extends Builder { + @Override public Tree build(String expression) throws ELException { try { return new ExtendedParser(this, expression).tree(); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelFunctions.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelFunctions.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelFunctions.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelFunctions.java Sun Jul 5 10:01:19 2009 @@ -261,6 +261,7 @@ } Debug.logVerbose("UelFunctions.Functions loaded " + this.functionMap.size() + " functions", module); } + @Override public Method resolveFunction(String prefix, String localName) { return functionMap.get(prefix + ":" + localName); } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java Sun Jul 5 10:01:19 2009 @@ -109,12 +109,15 @@ public BasicContext(Map<String, ? extends Object> context) { this.variableMapper = new BasicVariableMapper(context, this); } + @Override public ELResolver getELResolver() { return defaultResolver; } + @Override public FunctionMapper getFunctionMapper() { return UelFunctions.getFunctionMapper(); } + @Override public VariableMapper getVariableMapper() { return this.variableMapper; } @@ -134,6 +137,7 @@ * @param variable the variable's name * @return a BasicValueExpression containing the variable's value or null if the variable is unknown */ + @Override public ValueExpression resolveVariable(String variable) { Object obj = null; String createObjectType = null; @@ -189,6 +193,7 @@ } return null; } + @Override public ValueExpression setVariable(String variable, ValueExpression expression) { return new BasicValueExpression(this.variables.put(variable, expression.getValue(this.elContext))); } @@ -201,6 +206,7 @@ super(); this.object = object; } + @Override public boolean equals(Object obj) { if (this == obj) { return true; @@ -214,30 +220,39 @@ } catch (Exception e) {} return false; } + @Override public int hashCode() { return this.object == null ? 0 : this.object.hashCode(); } + @Override public Object getValue(ELContext context) { return this.object; } + @Override public String getExpressionString() { return null; } + @Override public boolean isLiteralText() { return false; } + @Override public Class<?> getType(ELContext context) { return this.object == null ? null : this.object.getClass(); } + @Override public boolean isReadOnly(ELContext context) { return false; } + @Override public void setValue(ELContext context, Object value) { this.object = value; } + @Override public String toString() { return "ValueExpression(" + this.object + ")"; } + @Override public Class<?> getExpectedType() { return this.object == null ? null : this.object.getClass(); } @@ -247,6 +262,7 @@ * auto-vivify. */ protected static class ExtendedCompositeResolver extends CompositeELResolver { + @Override public void setValue(ELContext context, Object base, Object property, Object val) { super.setValue(context, base, property, val); if (!context.isPropertyResolved() && base == null) { @@ -271,6 +287,7 @@ super(isReadOnly); this.isReadOnly = isReadOnly; } + @Override @SuppressWarnings("unchecked") public void setValue(ELContext context, Object base, Object property, Object val) { if (context == null) { @@ -317,6 +334,7 @@ public ExtendedMapResolver(boolean isReadOnly) { super(isReadOnly); } + @Override @SuppressWarnings("unchecked") public Object getValue(ELContext context, Object base, Object property) { if (context == null) { Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java Sun Jul 5 10:01:19 2009 @@ -584,9 +584,11 @@ this.templateLocation = templateLocation; } + @Override public int hashCode() { return templateLocation.hashCode(); } + @Override public boolean equals(Object obj) { return obj instanceof FlexibleTemplateSource && obj.hashCode() == this.hashCode(); } Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java (original) +++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java Sun Jul 5 10:01:19 2009 @@ -56,10 +56,12 @@ this.delegator = delegator; } + @Override public String getInfo() { return info; } + @Override public String getStoreName() { return storeName; } Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java (original) +++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java Sun Jul 5 10:01:19 2009 @@ -49,6 +49,7 @@ Debug.log("SSLImpl loaded; using custom ServerSocketFactory", module); } + @Override public ServerSocketFactory getServerSocketFactory() { return ssFactory; } Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java (original) +++ ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java Sun Jul 5 10:01:19 2009 @@ -88,7 +88,6 @@ } } - @SuppressWarnings("unchecked") private synchronized static void loadAuthenticators_internal(LocalDispatcher dispatcher) { if (!authenticatorsLoaded) { Iterator<Authenticator> it = ServiceRegistry.lookupProviders(Authenticator.class, getContextClassLoader()); 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=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Sun Jul 5 10:01:19 2009 @@ -1655,6 +1655,7 @@ *@return The GenericValue corresponding to the primaryKey *@deprecated Use findOne() instead */ + @Deprecated public GenericValue findByPrimaryKey(GenericPK primaryKey) throws GenericEntityException { return findOne(primaryKey.getEntityName(), primaryKey, false); } @@ -1665,6 +1666,7 @@ *@return The GenericValue corresponding to the primaryKey *@deprecated Use findOne() instead */ + @Deprecated public GenericValue findByPrimaryKeyCache(GenericPK primaryKey) throws GenericEntityException { return findOne(primaryKey.getEntityName(), primaryKey, true); } @@ -1676,6 +1678,7 @@ *@return The GenericValue corresponding to the primaryKey *@deprecated Use findOne() instead */ + @Deprecated public GenericValue findByPrimaryKey(String entityName, Object... fields) throws GenericEntityException { return findByPrimaryKey(entityName, UtilMisc.<String, Object>toMap(fields)); } @@ -1697,6 +1700,7 @@ *@return The GenericValue corresponding to the primaryKey *@deprecated Use findOne() instead */ + @Deprecated public GenericValue findByPrimaryKeySingle(String entityName, Object singlePkValue) throws GenericEntityException { return findOne(entityName, makePKSingle(entityName, singlePkValue), false); } @@ -1728,6 +1732,7 @@ *@return The GenericValue corresponding to the primaryKey *@deprecated Use findOne() instead */ + @Deprecated public GenericValue findByPrimaryKeyCacheSingle(String entityName, Object singlePkValue) throws GenericEntityException { return findOne(entityName, makePKSingle(entityName, singlePkValue), true); } @@ -1739,6 +1744,7 @@ *@return The GenericValue corresponding to the primaryKey *@deprecated Use findByPrimaryKeyPartial(GenericPK, Set<String>) instead */ + @Deprecated public GenericValue findByPrimaryKeyPartial(GenericPK primaryKey, String... keys) throws GenericEntityException { return findByPrimaryKeyPartial(primaryKey, UtilMisc.makeSetWritable(Arrays.asList(keys))); } @@ -1799,6 +1805,7 @@ *@return List of GenericValue objects corresponding to the passed primaryKey objects *@deprecated */ + @Deprecated public List<GenericValue> findAllByPrimaryKeys(Collection<GenericPK> primaryKeys) throws GenericEntityException { boolean beganTransaction = false; try { @@ -1861,6 +1868,7 @@ *@return List of GenericValue objects corresponding to the passed primaryKey objects *@deprecated */ + @Deprecated public List<GenericValue> findAllByPrimaryKeysCache(Collection<GenericPK> primaryKeys) throws GenericEntityException { boolean beganTransaction = false; try { @@ -1930,6 +1938,7 @@ *@return List containing all Generic entities *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findAll(String entityName) throws GenericEntityException { return this.findList(entityName, null, null, null, null, false); } @@ -1941,6 +1950,7 @@ *@return List containing all Generic entities *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findAll(String entityName, String... orderBy) throws GenericEntityException { return findList(entityName, null, null, Arrays.asList(orderBy), null, false); } @@ -1952,6 +1962,7 @@ *@return List containing all Generic entities *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findAll(String entityName, List<String> orderBy) throws GenericEntityException { return this.findList(entityName, null, null, orderBy, null, false); } @@ -1962,6 +1973,7 @@ *@return List containing all Generic entities *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findAllCache(String entityName) throws GenericEntityException { return this.findList(entityName, null, null, null, null, true); } @@ -1973,6 +1985,7 @@ *@return List containing all Generic entities *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findAllCache(String entityName, String... orderBy) throws GenericEntityException { return findList(entityName, null, null, Arrays.asList(orderBy), null, true); } @@ -1984,6 +1997,7 @@ *@return List containing all Generic entities *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findAllCache(String entityName, List<String> orderBy) throws GenericEntityException { return this.findList(entityName, null, null, orderBy, null, true); } @@ -2016,6 +2030,7 @@ * @return List of GenericValue instances that match the query *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findByOr(String entityName, Object... fields) throws GenericEntityException { EntityCondition ecl = EntityCondition.makeCondition(EntityOperator.OR, fields); return this.findList(entityName, ecl, null, null, null, false); @@ -2028,6 +2043,7 @@ * @return List of GenericValue instances that match the query *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findByOr(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException { EntityCondition ecl = EntityCondition.makeCondition(fields, EntityOperator.OR); return this.findList(entityName, ecl, null, null, null, false); @@ -2055,6 +2071,7 @@ * @return List of GenericValue instances that match the query *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findByOr(String entityName, Map<String, ? extends Object> fields, List<String> orderBy) throws GenericEntityException { EntityCondition ecl = EntityCondition.makeCondition(fields, EntityOperator.OR); return this.findList(entityName, ecl, null, orderBy, null, false); @@ -2067,6 +2084,7 @@ *@return List of GenericValue instances that match the query *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findByAndCache(String entityName, Object... fields) throws GenericEntityException { return this.findByAndCache(entityName, UtilMisc.<String, Object>toMap(fields)); } @@ -2099,6 +2117,7 @@ *@return List of GenericValue instances that match the query *@deprecated Use findList() instead */ + @Deprecated public <T extends EntityCondition> List<GenericValue> findByAnd(String entityName, T... expressions) throws GenericEntityException { EntityConditionList<T> ecl = EntityCondition.makeCondition(EntityOperator.AND, expressions); return this.findList(entityName, ecl, null, null, null, false); @@ -2111,6 +2130,7 @@ *@return List of GenericValue instances that match the query *@deprecated Use findList() instead */ + @Deprecated public <T extends EntityCondition> List<GenericValue> findByAnd(String entityName, List<T> expressions) throws GenericEntityException { EntityConditionList<T> ecl = EntityCondition.makeCondition(expressions, EntityOperator.AND); return this.findList(entityName, ecl, null, null, null, false); @@ -2124,6 +2144,7 @@ *@return List of GenericValue instances that match the query *@deprecated Use findList() instead */ + @Deprecated public <T extends EntityCondition> List<GenericValue> findByAnd(String entityName, List<T> expressions, List<String> orderBy) throws GenericEntityException { EntityConditionList<T> ecl = EntityCondition.makeCondition(expressions, EntityOperator.AND); return this.findList(entityName, ecl, null, orderBy, null, false); @@ -2136,6 +2157,7 @@ *@return List of GenericValue instances that match the query *@deprecated Use findList() instead */ + @Deprecated public <T extends EntityCondition> List<GenericValue> findByOr(String entityName, T... expressions) throws GenericEntityException { return this.findList(entityName, EntityCondition.makeCondition(EntityOperator.AND, expressions), null, null, null, false); } @@ -2147,6 +2169,7 @@ *@return List of GenericValue instances that match the query *@deprecated Use findList() instead */ + @Deprecated public <T extends EntityCondition> List<GenericValue> findByOr(String entityName, List<T> expressions) throws GenericEntityException { EntityConditionList<T> ecl = EntityCondition.makeCondition(expressions, EntityOperator.OR); return this.findList(entityName, ecl, null, null, null, false); @@ -2160,6 +2183,7 @@ *@return List of GenericValue instances that match the query *@deprecated Use findList() instead */ + @Deprecated public <T extends EntityCondition> List<GenericValue> findByOr(String entityName, List<T> expressions, List<String> orderBy) throws GenericEntityException { EntityConditionList<T> ecl = EntityCondition.makeCondition(expressions, EntityOperator.OR); return this.findList(entityName, ecl, null, orderBy, null, false); @@ -2169,6 +2193,7 @@ * NOTE 20080502: 0 references *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findByLike(String entityName, Object... fields) throws GenericEntityException { Map<String, ? extends Object> fieldMap = UtilMisc.<String, Object>toMap(fields); List<EntityExpr> likeExpressions = FastList.newInstance(); @@ -2185,6 +2210,7 @@ * NOTE 20080502: 1 references; all changed to findList *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findByLike(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException { List<EntityExpr> likeExpressions = FastList.newInstance(); if (fields != null) { @@ -2200,6 +2226,7 @@ * NOTE 20080502: 1 references; all changed to findList *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findByLike(String entityName, Map<String, ? extends Object> fields, List<String> orderBy) throws GenericEntityException { List<EntityExpr> likeExpressions = FastList.newInstance(); if (fields != null) { @@ -2220,6 +2247,7 @@ *@return List of GenericValue objects representing the result *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findByCondition(String entityName, EntityCondition entityCondition, Collection<String> fieldsToSelect, List<String> orderBy) throws GenericEntityException { return this.findList(entityName, entityCondition, UtilMisc.toSet(fieldsToSelect), orderBy, null, false); } @@ -2235,6 +2263,7 @@ *@return List of GenericValue objects representing the result *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions) throws GenericEntityException { @@ -2276,6 +2305,7 @@ *@return List of GenericValue objects representing the result *@deprecated Use findList() instead */ + @Deprecated public List<GenericValue> findByConditionCache(String entityName, EntityCondition entityCondition, Collection<String> fieldsToSelect, List<String> orderBy) throws GenericEntityException { return this.findList(entityName, entityCondition, UtilMisc.collectionToSet(fieldsToSelect), orderBy, null, true); } @@ -2290,6 +2320,7 @@ * DONE WITH IT, AND DON'T LEAVE IT OPEN TOO LONG BEACUSE IT WILL MAINTAIN A DATABASE CONNECTION. *@deprecated Use find() instead */ + @Deprecated public EntityListIterator findListIteratorByCondition(String entityName, EntityCondition entityCondition, Collection<String> fieldsToSelect, List<String> orderBy) throws GenericEntityException { return this.find(entityName, entityCondition, null, UtilMisc.collectionToSet(fieldsToSelect), orderBy, null); @@ -2307,6 +2338,7 @@ * DONE WITH IT, AND DON'T LEAVE IT OPEN TOO LONG BEACUSE IT WILL MAINTAIN A DATABASE CONNECTION. *@deprecated Use find() instead */ + @Deprecated public EntityListIterator findListIteratorByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions) throws GenericEntityException { @@ -2462,6 +2494,7 @@ * NOTE 20080502: 3 references; all changed to findCoundByCondition *@deprecated Use findCountByCondition() instead */ + @Deprecated public long findCountByAnd(String entityName) throws GenericEntityException { return findCountByCondition(entityName, null, null, null); } @@ -2470,6 +2503,7 @@ * NOTE 20080502: 1 references; all changed to use findCountByCondition *@deprecated Use findCountByCondition() instead */ + @Deprecated public long findCountByAnd(String entityName, Object... fields) throws GenericEntityException { return findCountByCondition(entityName, EntityCondition.makeCondition(UtilMisc.<String, Object>toMap(fields), EntityOperator.AND), null, null); } @@ -2478,6 +2512,7 @@ * NOTE 20080502: 8 references; all changed to use findCountByCondition *@deprecated Use findCountByCondition() instead */ + @Deprecated public long findCountByAnd(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException { return findCountByCondition(entityName, EntityCondition.makeCondition(fields, EntityOperator.AND), null, null); } @@ -2486,6 +2521,7 @@ * NOTE 20080502: 17 references; all changed to use remaining findCountByCondition *@deprecated Use findCountByCondition() instead */ + @Deprecated public long findCountByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition) throws GenericEntityException { return findCountByCondition(entityName, whereEntityCondition, havingEntityCondition, null); @@ -2600,6 +2636,7 @@ * @return List of GenericValue instances as specified in the relation definition *@deprecated Use getMultiRelation() instead */ + @Deprecated public List<GenericValue> getMultiRelation(GenericValue value, String relationNameOne, String relationNameTwo) throws GenericEntityException { return getMultiRelation(value, relationNameOne, relationNameTwo, null); } @@ -2613,6 +2650,7 @@ * @return List of GenericValue instances as specified in the relation definition *@deprecated Use getRelated() instead */ + @Deprecated public List<GenericValue> getRelated(String relationName, GenericValue value) throws GenericEntityException { return getRelated(relationName, null, null, value); } @@ -2627,6 +2665,7 @@ * @return List of GenericValue instances as specified in the relation definition *@deprecated Use getRelated() instead */ + @Deprecated public List<GenericValue> getRelatedByAnd(String relationName, Map<String, ? extends Object> byAndFields, GenericValue value) throws GenericEntityException { return this.getRelated(relationName, byAndFields, null, value); } @@ -2642,6 +2681,7 @@ * @return List of GenericValue instances as specified in the relation definition *@deprecated Use getRelated() instead */ + @Deprecated public List<GenericValue> getRelatedOrderBy(String relationName, List<String> orderBy, GenericValue value) throws GenericEntityException { return this.getRelated(relationName, null, orderBy, value); } 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=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Sun Jul 5 10:01:19 2009 @@ -1156,6 +1156,7 @@ *@param obj The object (GenericEntity) to compare this two *@return boolean stating if the two objects are equal */ + @Override public boolean equals(Object obj) { if (!(obj instanceof GenericEntity)) return false; @@ -1170,6 +1171,7 @@ /** Creates a hashCode for the entity, using the default String hashCode and Map hashCode, overrides the default hashCode *@return Hashcode corresponding to this entity */ + @Override public int hashCode() { // divide both by two (shift to right one bit) to maintain scale and add together if (generateHashCode) { @@ -1189,6 +1191,7 @@ * *@return String corresponding to this entity */ + @Override public String toString() { StringBuilder theString = new StringBuilder(); theString.append("[GenericEntity:"); @@ -1297,6 +1300,7 @@ /** Clones this GenericEntity, this is a shallow clone & uses the default shallow HashMap clone *@return Object that is a clone of this GenericEntity */ + @Override public Object clone() { GenericEntity newEntity = new GenericEntity(); newEntity.init(this); @@ -1374,9 +1378,11 @@ public static class NullGenericEntity extends GenericEntity implements NULL { protected NullGenericEntity() { } + @Override public String getEntityName() { return "[null-entity]"; } + @Override public String toString() { return "[null-entity]"; } @@ -1385,6 +1391,7 @@ public static class NullField implements NULL, Comparable<NullField> { protected NullField() { } + @Override public String toString() { return "[null-field]"; } 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=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericPK.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericPK.java Sun Jul 5 10:01:19 2009 @@ -31,6 +31,7 @@ public class GenericPK extends GenericEntity { protected static final ObjectFactory<GenericPK> genericPKFactory = new ObjectFactory<GenericPK>() { + @Override protected GenericPK create() { return new GenericPK(); } @@ -69,6 +70,7 @@ /** Clones this GenericPK, this is a shallow clone & uses the default shallow HashMap clone *@return Object that is a clone of this GenericPK */ + @Override public Object clone() { GenericPK newEntity = GenericPK.create(this); newEntity.setDelegator(internalDelegator); 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=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java Sun Jul 5 10:01:19 2009 @@ -49,6 +49,7 @@ public static final GenericValue NULL_VALUE = new NullGenericValue(); protected static final ObjectFactory<GenericValue> genericValueFactory = new ObjectFactory<GenericValue>() { + @Override protected GenericValue create() { return new GenericValue(); } @@ -103,6 +104,7 @@ return newValue; } + @Override public void reset() { // from GenericEntity super.reset(); @@ -113,6 +115,7 @@ this.originalDbValues = null; } + @Override public void synchronizedWithDatasource() { super.synchronizedWithDatasource(); this.copyOriginalDbValues(); @@ -490,6 +493,7 @@ /** Clones this GenericValue, this is a shallow clone & uses the default shallow HashMap clone *@return Object that is a clone of this GenericValue */ + @Override public Object clone() { GenericValue newEntity = GenericValue.create(this); newEntity.setDelegator(internalDelegator); @@ -497,9 +501,11 @@ } protected static class NullGenericValue extends GenericValue implements NULL { + @Override public String getEntityName() { return "[null-entity-value]"; } + @Override public String toString() { return "[null-entity-value]"; } 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=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValueHtmlWrapper.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValueHtmlWrapper.java Sun Jul 5 10:01:19 2009 @@ -40,6 +40,7 @@ @SuppressWarnings("serial") public class GenericValueHtmlWrapper extends GenericValue { protected static final ObjectFactory<GenericValueHtmlWrapper> genericValueHtmlWrapperFactory = new ObjectFactory<GenericValueHtmlWrapper>() { + @Override protected GenericValueHtmlWrapper create() { return new GenericValueHtmlWrapper(); } @@ -68,6 +69,7 @@ } }*/ + @Override public Object get(Object name) { Object value = super.get(name); if (value instanceof String) { @@ -83,6 +85,7 @@ super(gv, wrapper); } + @Override public TemplateModel get(String key) { TemplateModel tm = null; try { 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -29,14 +29,17 @@ super(delegatorName, "object-list"); } + @Override public Object get(String entityName, EntityCondition condition, String name) { return super.get(entityName, condition, name); } + @Override public Object put(String entityName, EntityCondition condition, String name, Object value) { return super.put(entityName, getFrozenConditionKey(condition), name, value); } + @Override public Object remove(String entityName, EntityCondition condition, String name) { return super.remove(entityName, condition, name); } 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -128,6 +128,7 @@ return secondModelEntity; } + @Override public String toString() { StringBuilder outputBuffer = new StringBuilder(); 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -31,7 +31,6 @@ import org.apache.oro.text.regex.Perl5Compiler; import org.apache.oro.text.regex.Perl5Matcher; import org.ofbiz.base.util.Debug; -import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.GenericDelegator; import org.ofbiz.entity.GenericModelException; @@ -68,6 +67,7 @@ return null; } + @Override public void validateSql(ModelEntity entity, Object lhs, Object rhs) throws GenericModelException { if (lhs instanceof EntityConditionValue) { EntityConditionValue ecv = (EntityConditionValue) lhs; @@ -79,11 +79,13 @@ } } + @Override public void visit(EntityConditionVisitor visitor, Object lhs, Object rhs) { visitor.accept(lhs); visitor.accept(rhs); } + @Override 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); @@ -135,6 +137,7 @@ return Boolean.valueOf(mapMatches(delegator, map, lhs, rhs)); } + @Override @SuppressWarnings("unchecked") public boolean mapMatches(GenericDelegator delegator, Map<String, ? extends Object> map, Object lhs, Object rhs) { Object leftValue; @@ -158,6 +161,7 @@ return compare((Comparable) leftValue, rightValue); } + @Override public EntityCondition freeze(Object lhs, Object rhs) { return EntityCondition.makeCondition(freeze(lhs), this, freeze(rhs)); } 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -134,6 +134,7 @@ return ews; } + @Override public String toString() { return makeWhereString(null, FastList.<EntityConditionParam>newInstance(), null); } 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -101,10 +101,12 @@ SqlJdbcUtil.addValue(buffer, params == null ? null : field, value, params); } + @Override public boolean equals(Object obj) { throw new UnsupportedOperationException("equals:" + getClass().getName()); } + @Override public int hashCode() { throw new UnsupportedOperationException("hashCode: " + getClass().getName()); } 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -37,12 +37,15 @@ public static class NOT extends EntityConditionFunction { public NOT(EntityCondition nested) { super(ID_NOT, "NOT", nested); } + @Override public boolean mapMatches(GenericDelegator delegator, Map<String, ? extends Object> map) { return !condition.mapMatches(delegator, map); } + @Override public EntityCondition freeze() { return new NOT(condition.freeze()); } + @Override public void encryptConditionFields(ModelEntity modelEntity, GenericDelegator delegator) { // nothing to do here... } @@ -79,20 +82,24 @@ return idInt; } + @Override public void visit(EntityConditionVisitor visitor) { visitor.acceptEntityConditionFunction(this, condition); } + @Override public boolean equals(Object obj) { if (!(obj instanceof EntityConditionFunction)) return false; EntityConditionFunction otherFunc = (EntityConditionFunction) obj; return this.idInt == otherFunc.idInt && (this.condition != null ? condition.equals(otherFunc.condition) : otherFunc.condition != null); } + @Override public int hashCode() { return idInt.hashCode() ^ condition.hashCode(); } + @Override public String makeWhereString(ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, DatasourceInfo datasourceInfo) { StringBuilder sb = new StringBuilder(); sb.append(codeString).append('('); @@ -101,6 +108,7 @@ return sb.toString(); } + @Override public void checkCondition(ModelEntity modelEntity) throws GenericModelException { condition.checkCondition(modelEntity); } 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -31,6 +31,7 @@ public static final String module = EntityConditionList.class.getName(); protected static final ObjectFactory<EntityConditionList> entityConditionListFactory = new ObjectFactory<EntityConditionList>() { + @Override protected EntityConditionList create() { return new EntityConditionList(); } @@ -41,23 +42,28 @@ } /** @deprecated Use EntityCondition.makeCondition() instead */ + @Deprecated public EntityConditionList(EntityJoinOperator operator, T... conditionList) { init(operator, conditionList); } /** @deprecated Use EntityCondition.makeCondition() instead */ + @Deprecated public EntityConditionList(List<T> conditionList, EntityJoinOperator operator) { init(conditionList, operator); } + @Override public int getConditionListSize() { return super.getConditionListSize(); } + @Override public Iterator<T> getConditionIterator() { return super.getConditionIterator(); } + @Override 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -79,10 +79,12 @@ return this.conditionList.iterator(); } + @Override public void visit(EntityConditionVisitor visitor) { visitor.acceptEntityJoinOperator(operator, conditionList); } + @Override public String makeWhereString(ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, DatasourceInfo datasourceInfo) { // if (Debug.verboseOn()) Debug.logVerbose("makeWhereString for entity " + modelEntity.getEntityName(), module); StringBuilder sql = new StringBuilder(); @@ -90,25 +92,30 @@ return sql.toString(); } + @Override public void checkCondition(ModelEntity modelEntity) throws GenericModelException { // if (Debug.verboseOn()) Debug.logVerbose("checkCondition for entity " + modelEntity.getEntityName(), module); operator.validateSql(modelEntity, conditionList); } + @Override public boolean mapMatches(GenericDelegator delegator, Map<String, ? extends Object> map) { return operator.mapMatches(delegator, map, conditionList); } + @Override public EntityCondition freeze() { return operator.freeze(conditionList); } + @Override public void encryptConditionFields(ModelEntity modelEntity, GenericDelegator delegator) { for (T cond: this.conditionList) { cond.encryptConditionFields(modelEntity, delegator); } } + @Override public boolean equals(Object obj) { if (!(obj instanceof EntityConditionListBase)) return false; EntityConditionListBase other = (EntityConditionListBase) obj; @@ -122,6 +129,7 @@ return isEqual; } + @Override public int hashCode() { return conditionList.hashCode() + operator.hashCode(); } 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -48,6 +48,7 @@ return fieldValue; } + @Override public String toString() { return modelField.getColName() + "=" + fieldValue.toString(); } 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -51,6 +51,7 @@ this.requireAll = requireAll; } + @Override public void addSqlValue(StringBuilder sql, Map<String, String> tableAliases, ModelEntity parentModelEntity, List<EntityConditionParam> entityConditionParams, boolean includeTableNamePrefix, DatasourceInfo datasourceInfo) { if (localModelEntity instanceof ModelViewEntity && datasourceInfo == null) { @@ -105,24 +106,29 @@ } } + @Override public EntityConditionValue freeze() { return new EntityConditionSubSelect(localModelEntity, keyFieldName, (whereCond != null ? whereCond.freeze() : null), requireAll); } + @Override public ModelField getModelField(ModelEntity modelEntity) { // do nothing for now return null; } + @Override public Comparable getValue(GenericDelegator delegator, Map<String, ? extends Object> map) { // do nothing for now return null; } + @Override public void validateSql(ModelEntity modelEntity) throws GenericModelException { // do nothing for now } + @Override public void visit(EntityConditionVisitor visitor) { if (whereCond != null) whereCond.visit(visitor); } 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -68,6 +68,7 @@ addSqlValue(sb, null, new ArrayList<EntityConditionParam>(), false, null); } + @Override public String toString() { StringBuilder sql = new StringBuilder(); toString(sql); 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=791212&r1=791211&r2=791212&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 Sun Jul 5 10:01:19 2009 @@ -33,6 +33,7 @@ public class EntityDateFilterCondition extends EntityCondition { protected static final ObjectFactory<EntityDateFilterCondition> entityDateFilterConditionFactory = new ObjectFactory<EntityDateFilterCondition>() { + @Override protected EntityDateFilterCondition create() { return new EntityDateFilterCondition(); } @@ -44,6 +45,7 @@ protected EntityDateFilterCondition() {} /** @deprecated Use EntityCondition.makeConditionDate() instead */ + @Deprecated public EntityDateFilterCondition(String fromDateName, String thruDateName) { init(fromDateName, thruDateName); } @@ -58,43 +60,52 @@ this.thruDateName = null; } + @Override public String makeWhereString(ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, DatasourceInfo datasourceInfo) { EntityCondition condition = makeCondition(); return condition.makeWhereString(modelEntity, entityConditionParams, datasourceInfo); } + @Override public void checkCondition(ModelEntity modelEntity) throws GenericModelException { EntityCondition condition = makeCondition(); condition.checkCondition(modelEntity); } + @Override public boolean mapMatches(GenericDelegator delegator, Map<String, ? extends Object> map) { EntityCondition condition = makeCondition(); return condition.mapMatches(delegator, map); } + @Override public boolean equals(Object obj) { if (!(obj instanceof EntityDateFilterCondition)) return false; EntityDateFilterCondition other = (EntityDateFilterCondition) obj; return equals(fromDateName, other.fromDateName) && equals(thruDateName, other.thruDateName); } + @Override public int hashCode() { return hashCode(fromDateName) ^ hashCode(thruDateName); } + @Override public void visit(EntityConditionVisitor visitor) { visitor.acceptEntityDateFilterCondition(this); } + @Override public void accept(EntityConditionVisitor visitor) { visitor.acceptEntityDateFilterCondition(this); } + @Override public EntityCondition freeze() { return this; } + @Override public void encryptConditionFields(ModelEntity modelEntity, GenericDelegator delegator) { // nothing to do here... } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityExpr.java Sun Jul 5 10:01:19 2009 @@ -21,8 +21,6 @@ import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.Set; - import javolution.context.ObjectFactory; import org.ofbiz.base.util.Debug; @@ -33,12 +31,10 @@ import org.ofbiz.entity.GenericEntity; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericModelException; -import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.config.DatasourceInfo; import org.ofbiz.entity.model.ModelEntity; import org.ofbiz.entity.model.ModelField; import org.ofbiz.entity.model.ModelFieldType; -import org.ofbiz.entity.model.ModelFieldTypeReader; /** * Encapsulates simple expressions used for specifying queries @@ -48,6 +44,7 @@ public static final String module = EntityExpr.class.getName(); protected static final ObjectFactory<EntityExpr> entityExprFactory = new ObjectFactory<EntityExpr>() { + @Override protected EntityExpr create() { return new EntityExpr(); } @@ -60,21 +57,25 @@ protected EntityExpr() {} /** @deprecated Use EntityCondition.makeCondition() instead */ + @Deprecated public EntityExpr(Object lhs, EntityComparisonOperator operator, Object rhs) { this.init(lhs, operator, rhs); } /** @deprecated Use EntityCondition.makeCondition() instead */ + @Deprecated public EntityExpr(String lhs, EntityComparisonOperator operator, Object rhs) { this.init(lhs, operator, rhs); } /** @deprecated Use EntityCondition.makeCondition() instead */ + @Deprecated public EntityExpr(String lhs, boolean leftUpper, EntityComparisonOperator operator, Object rhs, boolean rightUpper) { this.init(leftUpper ? EntityFunction.UPPER_FIELD(lhs) : lhs, operator, rightUpper ? EntityFunction.UPPER(rhs) : rhs); } /** @deprecated Use EntityCondition.makeCondition() instead */ + @Deprecated public EntityExpr(EntityCondition lhs, EntityJoinOperator operator, EntityCondition rhs) { this.init(lhs, operator, rhs); } @@ -133,20 +134,24 @@ } /** @deprecated */ + @Deprecated public void setLUpper(boolean upper) { } /** @deprecated */ + @Deprecated public boolean isLUpper() { return lhs instanceof EntityFunction.UPPER; } /** @deprecated */ + @Deprecated public boolean isRUpper() { return rhs instanceof EntityFunction.UPPER; } /** @deprecated */ + @Deprecated public void setRUpper(boolean upper) { } @@ -162,6 +167,7 @@ return rhs; } + @Override public String makeWhereString(ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, DatasourceInfo datasourceInfo) { // if (Debug.verboseOn()) Debug.logVerbose("makeWhereString for entity " + modelEntity.getEntityName(), module); @@ -172,10 +178,12 @@ return sql.toString(); } + @Override public boolean mapMatches(GenericDelegator delegator, Map<String, ? extends Object> map) { return operator.mapMatches(delegator, map, lhs, rhs); } + @Override public void checkCondition(ModelEntity modelEntity) throws GenericModelException { // if (Debug.verboseOn()) Debug.logVerbose("checkCondition for entity " + modelEntity.getEntityName(), module); if (lhs instanceof EntityCondition) { @@ -184,6 +192,7 @@ } } + @Override protected void addValue(StringBuilder buffer, ModelField field, Object value, List<EntityConditionParam> params) { if (rhs instanceof EntityFunction.UPPER) { if (value instanceof String) { @@ -193,10 +202,12 @@ super.addValue(buffer, field, value, params); } + @Override public EntityCondition freeze() { return operator.freeze(lhs, rhs); } + @Override public void encryptConditionFields(ModelEntity modelEntity, GenericDelegator delegator) { if (this.lhs instanceof String) { ModelField modelField = modelEntity.getField((String) this.lhs); @@ -212,10 +223,12 @@ } } + @Override public void visit(EntityConditionVisitor visitor) { visitor.acceptEntityOperator(operator, lhs, rhs); } + @Override public void accept(EntityConditionVisitor visitor) { visitor.acceptEntityExpr(this); } @@ -272,6 +285,7 @@ } } + @Override public boolean equals(Object obj) { if (!(obj instanceof EntityExpr)) return false; EntityExpr other = (EntityExpr) obj; @@ -286,6 +300,7 @@ return isEqual; } + @Override public int hashCode() { return hashCode(lhs) + hashCode(operator) + Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldMap.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldMap.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldMap.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldMap.java Sun Jul 5 10:01:19 2009 @@ -36,6 +36,7 @@ public class EntityFieldMap extends EntityConditionListBase<EntityExpr> { protected static final ObjectFactory<EntityFieldMap> entityFieldMapFactory = new ObjectFactory<EntityFieldMap>() { + @Override protected EntityFieldMap create() { return new EntityFieldMap(); } @@ -62,21 +63,25 @@ /** @deprecated Use EntityCondition.makeCondition() instead */ + @Deprecated public EntityFieldMap(EntityComparisonOperator compOp, EntityJoinOperator joinOp, Object... keysValues) { this.init(compOp, joinOp, keysValues); } /** @deprecated Use EntityCondition.makeCondition() instead */ + @Deprecated public EntityFieldMap(Map<String, ? extends Object> fieldMap, EntityComparisonOperator compOp, EntityJoinOperator joinOp) { this.init(fieldMap, compOp, joinOp); } /** @deprecated Use EntityCondition.makeCondition() instead */ + @Deprecated public EntityFieldMap(EntityJoinOperator operator, Object... keysValues) { this.init(EntityOperator.EQUALS, operator, keysValues); } /** @deprecated Use EntityCondition.makeCondition() instead */ + @Deprecated public EntityFieldMap(Map<String, ? extends Object> fieldMap, EntityJoinOperator operator) { this.init(fieldMap, EntityOperator.EQUALS, operator); } @@ -95,6 +100,7 @@ this.operator = joinOp; } + @Override public void reset() { super.reset(); this.fieldMap = null; @@ -116,6 +122,7 @@ return Collections.unmodifiableMap(this.fieldMap).entrySet().iterator(); } + @Override public void accept(EntityConditionVisitor visitor) { visitor.acceptEntityFieldMap(this); } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java Sun Jul 5 10:01:19 2009 @@ -39,6 +39,7 @@ public class EntityFieldValue extends EntityConditionValue implements Reusable { protected static final ObjectFactory<EntityFieldValue> entityFieldValueFactory = new ObjectFactory<EntityFieldValue>() { + @Override protected EntityFieldValue create() { return new EntityFieldValue(); } @@ -55,6 +56,7 @@ protected EntityFieldValue() {} /** @deprecated Use EntityFieldValue.makeFieldValue() instead */ + @Deprecated public EntityFieldValue(String fieldName) { this.init(fieldName); } @@ -71,24 +73,29 @@ return fieldName; } + @Override public int hashCode() { return fieldName.hashCode(); } + @Override public boolean equals(Object obj) { if (!(obj instanceof EntityFieldValue)) return false; EntityFieldValue otherValue = (EntityFieldValue) obj; return fieldName.equals(otherValue.fieldName); } + @Override public ModelField getModelField(ModelEntity modelEntity) { return getField(modelEntity, fieldName); } + @Override public void addSqlValue(StringBuilder sql, Map<String, String> tableAliases, ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, boolean includeTableNamePrefix, DatasourceInfo datasourceInfo) { sql.append(getColName(tableAliases, modelEntity, fieldName, includeTableNamePrefix, datasourceInfo)); } + @Override public void validateSql(ModelEntity modelEntity) throws GenericModelException { ModelField field = getModelField(modelEntity); if (field == null) { @@ -96,6 +103,7 @@ } } + @Override public Object getValue(GenericDelegator delegator, Map<String, ? extends Object> map) { if (map == null) { return null; @@ -107,14 +115,17 @@ } } + @Override public void visit(EntityConditionVisitor visitor) { visitor.acceptEntityFieldValue(this); } + @Override public void accept(EntityConditionVisitor visitor) { visitor.acceptEntityFieldValue(this); } + @Override public EntityConditionValue freeze() { return this; } |
Free forum by Nabble | Edit this page |