Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 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;
 }