public int hashCode() { int result = HashCodeUtil.SEED; // collect the contributions of various fields result = HashCodeUtil.hash(result, this.first); result = HashCodeUtil.hash(result, this.second); return result; }
/** * Implements for MMObjectNode * * @since MMBase-1.6.2 */ @Override public int hashCode(MMObjectNode o) { int result = 0; result = HashCodeUtil.hashCode(result, o.getIntValue("snumber")); result = HashCodeUtil.hashCode(result, o.getIntValue("dnumber")); result = HashCodeUtil.hashCode(result, o.getIntValue("rnumber")); return result; }
static ORMSQLContext getDelete(String clazzName, Object object, List<Object> objects) { long hashCode = HashCodeUtil.computeHashOverload(object, clazzName, objects); ORMSQLContext context = mpDeleteSQL.get(hashCode); if (null == context) { synchronized (mpDeleteSQL) { if (null == context) { context = buildDeleteColumnList(object, ORMResourceRegistry.getClass(clazzName)); LOGGER.info("Caching Delete SQL:" + context.getSQL()); mpDeleteSQL.put(hashCode, context); } } } return context; }
static ORMSQLContext getCreate(Object object, List<Object> objects) { String clazzName = ORMResourceRegistry.getClassName(object); long hashCode = HashCodeUtil.computeHashOverload(object, clazzName, objects); ORMSQLContext context = mpCreateSQL.get(hashCode); if (null == context) { synchronized (mpCreateSQL) { if (null == context) { context = buildCreateColumnList( object, ORMResourceRegistry.getClass(clazzName), "INSERT INTO", "create"); LOGGER.info("Caching Create SQL(hashcode:" + hashCode + ") " + context.getSQL()); mpCreateSQL.put(hashCode, context); } } } clazzName = null; return context; }