 package pl.exsio.querydsl.entityql.java.jpa.entity.generated;

 import com.querydsl.core.types.Path;
 import com.querydsl.sql.PrimaryKey;
 import pl.exsio.querydsl.entityql.QColumnMetadataFactory;
 import pl.exsio.querydsl.entityql.QPathConfig;
 import pl.exsio.querydsl.entityql.QPathFactory;
 import pl.exsio.querydsl.entityql.QStaticModel;
 import com.querydsl.sql.ForeignKey;
 import pl.exsio.querydsl.entityql.java.jpa.entity.JOrderItem;
 import com.querydsl.core.types.dsl.NumberPath;
 import pl.exsio.querydsl.entityql.java.jpa.entity.JBook;
 import pl.exsio.querydsl.entityql.java.jpa.entity.JOrder;
 import javax.annotation.Generated;
 import java.util.Arrays;
 
 /**
 *
 * This class was generated by EntityQL (https://github.com/eXsio/querydsl-entityql).
 * It is not recommended to make any changes to this class.
 * Any manual changes will be lost upon the next class generation.
 *
 */
 @Generated("pl.exsio.querydsl.entityql.QExporter")
 public final class QJOrderItem extends QStaticModel<JOrderItem> {

     private static final long serialVersionUID = 673930422;

     public static final QJOrderItem INSTANCE = new QJOrderItem();

     public static final QJOrderItem qJOrderItem = INSTANCE;

     public final NumberPath<Long> id;

     public final NumberPath<Long> quantity;

     public final NumberPath<Long> bookId;

     public final NumberPath<Long> orderId;

     public final NumberPath<Long> orderReferencedId;

     public final ForeignKey<JBook> book;

     public final ForeignKey<JOrder> order;

     public final ForeignKey<JOrder> orderReferenced;

     public final PrimaryKey<JOrderItem> _primaryKey;

     public QJOrderItem() {
         this("JORDER_ITEMS");
     }
     @SuppressWarnings(value = "unchecked")
     public QJOrderItem(String variable) {
         super(JOrderItem.class, variable, "", "JORDER_ITEMS");
         id: {
             QPathConfig config = new QPathConfig(Long.class, Long.class, "ORDER_ITEM_ID", true, 1, -5);
             this.id = QPathFactory.<NumberPath<Long>>create(this, config);
             addMetadata(this.id, QColumnMetadataFactory.create(config));
             this.columnsMap.put("id", this.id);
         }

         quantity: {
             QPathConfig config = new QPathConfig(Long.class, Long.class, "QTY", false, 5, -5);
             this.quantity = QPathFactory.<NumberPath<Long>>create(this, config);
             addMetadata(this.quantity, QColumnMetadataFactory.create(config));
             this.columnsMap.put("quantity", this.quantity);
         }

         bookId: {
             QPathConfig config = new QPathConfig(Long.class, Long.class, "BOOK_ID", false, 2, -5);
             this.bookId = QPathFactory.<NumberPath<Long>>create(this, config);
             addMetadata(this.bookId, QColumnMetadataFactory.create(config));
             this.columnsMap.put("bookId", this.bookId);
         }

         orderId: {
             QPathConfig config = new QPathConfig(Long.class, Long.class, "ITEM_ORDER_ID", false, 3, -5);
             this.orderId = QPathFactory.<NumberPath<Long>>create(this, config);
             addMetadata(this.orderId, QColumnMetadataFactory.create(config));
             this.columnsMap.put("orderId", this.orderId);
         }

         orderReferencedId: {
             QPathConfig config = new QPathConfig(Long.class, Long.class, "ITEM_ORDER_ID", false, 4, -5);
             this.orderReferencedId = QPathFactory.<NumberPath<Long>>create(this, config);
             addMetadata(this.orderReferencedId, QColumnMetadataFactory.create(config));
             this.columnsMap.put("orderReferencedId", this.orderReferencedId);
         }

         book: {
             this.book = this.<JBook>createForeignKey(this.bookId, "BOOK_ID");
             this.joinColumnsMap.put("book", this.book);
         }

         order: {
             this.order = this.<JOrder>createForeignKey(this.orderId, "ORDER_ID");
             this.joinColumnsMap.put("order", this.order);
         }

         orderReferenced: {
             this.orderReferenced = this.<JOrder>createForeignKey(this.orderReferencedId, "ORDER_ID");
             this.joinColumnsMap.put("orderReferenced", this.orderReferenced);
         }

         _primaryKey: {
             this.primaryKeyColumns = Arrays.<Path<?>>asList(this.id);
             Path[] pkArray = (Path[]) primaryKeyColumns.<Path>toArray(new Path[0]);
             this._primaryKey = this.<JOrderItem>createPrimaryKey(pkArray);
         }

     }
 } 