Package org.nutz.dao.entity.annotation

Examples of org.nutz.dao.entity.annotation.Default


    ef.setColumnName(columnName);
    ef.setReadonly((field.getAnnotation(Readonly.class) != null));
    MyField myField=table.getField(columnName);
    ef.setNotNull(!myField.isAllowNull());
//    @Default
    Default dft = field.getAnnotation(Default.class);
    if (null != dft) {//如果定义了注解
      ef.setDefaultValue(new CharSegment(dft.value()));
    }else if(myField.getDefaultValue()!=null){//如果没有就尝试从数据库中获取
      ef.setDefaultValue(new CharSegment(myField.getDefaultValue().toString()));
    }
//    @Prev
    Prev prev = field.getAnnotation(Prev.class);
View Full Code Here

TOP

Related Classes of org.nutz.dao.entity.annotation.Default

Copyright © 2018 www.massapicom. 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.