Examples of foreignKey()


Examples of com.jfinal.ext.interceptor.pageinfo.Parent.foreignKey()

   

    @SuppressWarnings({ "unchecked", "rawtypes" })
    public List<M> children(Class<? extends Model> model) {
        Parent child = model.getAnnotation(Parent.class);
        String foreignKey = child.foreignKey();
        Class<? extends Model> childModel = child.model();
        String childTableName = TableMapping.me().getTable(childModel).getName();
        String primaryKey = TableMapping.me().getTable(clazz).getPrimaryKey();
        try {
            return childModel.newInstance().find("select * from " + childTableName + " where " + foreignKey + "= ?",
View Full Code Here

Examples of com.jfinal.ext.interceptor.pageinfo.Parent.foreignKey()

    }

    @SuppressWarnings({ "unchecked", "rawtypes" })
    public M parent(Class<? extends Model> model) {
        Parent parent = model.getAnnotation(Parent.class);
        String foreignKey = parent.foreignKey();
        Class<? extends Model> parentModel = parent.model();
        String parentTableName = TableMapping.me().getTable(parentModel).getName();
        String primaryKey = TableMapping.me().getTable(clazz).getPrimaryKey();
        try {
            return (M) parentModel.newInstance().findFirst(
View Full Code Here

Examples of javax.persistence.JoinColumn.foreignKey()

    value.setTypeName( inferredData.getClassOrElementName() );
    final String propertyName = inferredData.getPropertyName();
    value.setTypeUsingReflection( propertyHolder.getClassName(), propertyName );
   
    String fkName = null;
    if ( joinColumn != null && joinColumn.foreignKey() != null ) {
      fkName = joinColumn.foreignKey().name();
    }
    if ( StringHelper.isEmpty( fkName ) ) {
      ForeignKey fk = property.getAnnotation( ForeignKey.class );
      fkName = fk != null ? fk.name() : "";
View Full Code Here

Examples of javax.persistence.JoinColumn.foreignKey()

    final String propertyName = inferredData.getPropertyName();
    value.setTypeUsingReflection( propertyHolder.getClassName(), propertyName );
   
    String fkName = null;
    if ( joinColumn != null && joinColumn.foreignKey() != null ) {
      fkName = joinColumn.foreignKey().name();
    }
    if ( StringHelper.isEmpty( fkName ) ) {
      ForeignKey fk = property.getAnnotation( ForeignKey.class );
      fkName = fk != null ? fk.name() : "";
    }
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.