Package cn.org.zeronote.orm

Examples of cn.org.zeronote.orm.ORMTable.tableName()


   * @return
   */
  private List<String> generaCacheKey(Object obj) {
    ORMTable ormTable = obj.getClass().getAnnotation(ORMTable.class);
    if (ormTable != null) {
      String cachedTableKey = "".equalsIgnoreCase(ormTable.cachedShortAlias()) ? ormTable.tableName() : ormTable.cachedShortAlias();
      String[] cachedKeys = ormTable.cachedKey();
     
      if (cachedKeys.length > 0) {
        List<String> ks = new ArrayList<String>();
        for (int i = 0; i < cachedKeys.length; i++) {
View Full Code Here


    if (jedis != null) {
      try {
        T t = null;
        // 先在redis里找 XXX Annotation可以cache
        ORMTable ormTable = pojoType.getAnnotation(ORMTable.class);
        String cachedTableKey = "".equalsIgnoreCase(ormTable.cachedShortAlias()) ? ormTable.tableName() : ormTable.cachedShortAlias();
       
        String[] cachedKeys = ormTable.cachedKey();
        for (String cachedKey : cachedKeys) {
          String[] ks = cachedKey.split("=");
          Object arg = args.get(ks[0]);
View Full Code Here

    ORMTable ormTable = pojoClazz.getAnnotation(ORMTable.class);
    if (ormTable == null) {
      throw new IllegalAccessException("It not a ORMTable Class!");
    }
   
    String tableName = ormTable.tableName();
    String[] orders = ormTable.order();
    List<Object> params = new ArrayList<Object>();
   
    this.sql = genSql(params, tableName, this.argsMap, orders);
   
View Full Code Here

      throw new IllegalAccessException("It not a ORMTable Class!");
    }
    ORMHash ormHashTable = pojoClazz.getAnnotation(ORMHash.class);
   
   
    String tableName = ormHashTable == null ? ormTable.tableName() : DBUtils.getInstance().getHashTableName(ormHashTable, ormTable, pojo);
    generate(tableName);
   
  }
 
  /**
 
View Full Code Here

   
    ORMHash ormHashTable = pojoClazz.getAnnotation(ORMHash.class);
   
    String tableName = null;
    if (ormHashTable == null) {
      tableName = ormTable.tableName();
    } else {
      String hashKey = this.pojoClazz.getDeclaredField(ormHashTable.hashRefColumn()).getName();
      long hashCol = Long.valueOf(String.valueOf(this.delArgs.get(hashKey)));
      tableName = DBUtils.getInstance().findHashTableName(ormHashTable, ormTable, hashCol);
    }
View Full Code Here

      throw new IllegalAccessException("It not a ORMTable Class!");
    }
    ORMHash ormHashTable = pojoClazz.getAnnotation(ORMHash.class);
   
   
    String tableName = ormHashTable == null ? ormTable.tableName() : DBUtils.getInstance().getHashTableName(ormHashTable, ormTable, pojo);
    generate(tableName);
  }
 
  /**
   * 生成sql
 
View Full Code Here

      throw new IllegalAccessException("It not a ORMTable Class!");
    }
    ORMHash ormHashTable = pojoClazz.getAnnotation(ORMHash.class);
   
   
    String tableName = ormHashTable == null ? ormTable.tableName() : DBUtils.getInstance().getHashTableName(ormHashTable, ormTable, pojo);
    generate(tableName);
   
  }
 
  /**
 
View Full Code Here

   
    ORMHash ormHashTable = pojoClazz.getAnnotation(ORMHash.class);
   
    String tableName = null;
    if (ormHashTable == null) {
      tableName = ormTable.tableName();
    } else {
      String hashKey = this.pojoClazz.getDeclaredField(ormHashTable.hashRefColumn()).getName();
      long hashCol = Long.valueOf(String.valueOf(this.delArgs.get(hashKey)));
      tableName = DBUtils.getInstance().findHashTableName(ormHashTable, ormTable, hashCol);
    }
View Full Code Here

      throw new IllegalAccessException("It not a ORMTable Class!");
    }
    ORMHash ormHashTable = pojoClazz.getAnnotation(ORMHash.class);
   
   
    String tableName = ormHashTable == null ? ormTable.tableName() : DBUtils.getInstance().getHashTableName(ormHashTable, ormTable, pojo);
    generate(tableName);
  }
 
  /**
   * 生成sql
 
View Full Code Here

    ORMTable ormTable = pojoClazz.getAnnotation(ORMTable.class);
    if (ormTable == null) {
      throw new IllegalAccessException("It not a ORMTable Class!");
    }
   
    String tableName = ormTable.tableName();
    String[] orders = ormTable.order();
    List<Object> params = new ArrayList<Object>();
   
    this.sql = genSql(params, tableName, this.argsMap, orders);
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.