Examples of physicalPkFld()


Examples of cn.org.zeronote.orm.ORMColumn.physicalPkFld()

  public void find(Object... objs) throws IllegalArgumentException, IllegalAccessException, SQLException {
    Class<?> clz = objs[0].getClass();
    Field[] fields = clz.getDeclaredFields();
    for (Field field : fields) {
      ORMColumn oc = field.getAnnotation(ORMColumn.class);
      if (oc != null && oc.physicalPkFld() && oc.autoIncrement()) {
        // 找到最后一个自增id
        QueryRunner qr = new QueryRunner();
        Object identityVal = qr.query(conn, selectKey.getQuery(), new ScalarHandler<Object>());
        Long identity = NumberUtils.parseNumber(identityVal.toString(), Long.class);
       
View Full Code Here

Examples of cn.org.zeronote.orm.ORMColumn.physicalPkFld()

    Field[] fields = pojoType.getDeclaredFields();
    for (Field f : fields) {
      ORMColumn ormc = f.getAnnotation(ORMColumn.class);
      if (ormc != null) {
        if (usePhysicalPk) {
          if (ormc.physicalPkFld()) {
            f.setAccessible(true);
            delArgs.put(f.getName(), pkVal);
          }
        } else {
          if (ormc.LogicPkFld()) {
View Full Code Here

Examples of cn.org.zeronote.orm.ORMColumn.physicalPkFld()

    Field[] fields = pojo.getClass().getDeclaredFields();
    for (Field f : fields) {
      ORMColumn ormc = f.getAnnotation(ORMColumn.class);
      if (ormc != null) {
        if (usePhysicalPk) {
          if (ormc.physicalPkFld()) {
            f.setAccessible(true);
            delArgs.put(f.getName(), f.get(pojo));
          }
        } else {
          if (ormc.LogicPkFld()) {
View Full Code Here

Examples of cn.org.zeronote.orm.ORMColumn.physicalPkFld()

    List<String> pks = null;
    if (usePhysicalPk) {
      pks = new ArrayList<String>();
      for (Field f : fields) {
        ORMColumn ormc = f.getAnnotation(ORMColumn.class);
        if (ormc != null && ormc.physicalPkFld()) {
          pks.add(ormc.value());
        }
      }
    } else {
      pks = new ArrayList<String>();
View Full Code Here

Examples of cn.org.zeronote.orm.ORMColumn.physicalPkFld()

  public void find(Object... objs) throws IllegalArgumentException, IllegalAccessException, SQLException {
    Class<?> clz = objs[0].getClass();
    Field[] fields = clz.getDeclaredFields();
    for (Field field : fields) {
      ORMColumn oc = field.getAnnotation(ORMColumn.class);
      if (oc != null && oc.physicalPkFld() && oc.autoIncrement()) {
        // 找到最后一个自增id
        QueryRunner qr = new QueryRunner();
        Object identityVal = qr.query(conn, selectKey.getQuery(), new ScalarHandler<Object>());
        Long identity = NumberUtils.parseNumber(identityVal.toString(), Long.class);
       
View Full Code Here

Examples of cn.org.zeronote.orm.ORMColumn.physicalPkFld()

    Field[] fields = pojoType.getDeclaredFields();
    for (Field f : fields) {
      ORMColumn ormc = f.getAnnotation(ORMColumn.class);
      if (ormc != null) {
        if (usePhysicalPk) {
          if (ormc.physicalPkFld()) {
            f.setAccessible(true);
            delArgs.put(f.getName(), pkVal);
          }
        } else {
          if (ormc.LogicPkFld()) {
View Full Code Here

Examples of cn.org.zeronote.orm.ORMColumn.physicalPkFld()

    Field[] fields = pojo.getClass().getDeclaredFields();
    for (Field f : fields) {
      ORMColumn ormc = f.getAnnotation(ORMColumn.class);
      if (ormc != null) {
        if (usePhysicalPk) {
          if (ormc.physicalPkFld()) {
            f.setAccessible(true);
            delArgs.put(f.getName(), f.get(pojo));
          }
        } else {
          if (ormc.LogicPkFld()) {
View Full Code Here

Examples of cn.org.zeronote.orm.ORMColumn.physicalPkFld()

    List<String> pks = null;
    if (usePhysicalPk) {
      pks = new ArrayList<String>();
      for (Field f : fields) {
        ORMColumn ormc = f.getAnnotation(ORMColumn.class);
        if (ormc != null && ormc.physicalPkFld()) {
          pks.add(ormc.value());
        }
      }
    } else {
      pks = new ArrayList<String>();
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.