All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.wesleyhome.dao.processor.model.EntityInfo Maven / Gradle / Ivy

/*
 * @(#)GeneratedQuery.java
 * 
 * (C) Copyright 2014 by Travelers
 * All Rights Reserved.
 * 
 * This software is the confidential and proprietary information
 * of the Travelers Corporation. ("Confidential Information").
 * Redistribution of the source code or binary form is not permitted
 * without prior authorization from Travelers.
 */
package com.wesleyhome.dao.processor.model;

import java.util.List;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
import com.wesleyhome.dao.annotations.ScopeType;

/**
 * The GeneratedQuery class is a
 * 
 * @author
 * @since
 */
public class EntityInfo {

	public final TypeElement typeElement;
	public final String subPackageName;
	public final String fullEntityClassName;
	public final String entityName;
	public final ScopeType scopeType;
	public final List customQueryInfoList;
	public final List queryParameterInfoList;
	public final List namedQueryInfoList;
	public final List idElements;

	/**
	 * @param typeElement
	 * @param subPackageName
	 * @param fullEntityClassName
	 * @param entityName
	 * @param scopeType
	 * @param customQueryInfoList
	 * @param queryParameterInfoList
	 */
	public EntityInfo(final TypeElement typeElement, final String subPackageName, final String fullEntityClassName,
		final String entityName, final ScopeType scopeType, final List customQueryInfoList,
		final List queryParameterInfoList, final List idElements,
		final List namedQueryInfoList) {
		super();
		this.typeElement = typeElement;
		this.subPackageName = subPackageName;
		this.fullEntityClassName = fullEntityClassName;
		this.entityName = entityName;
		this.scopeType = scopeType;
		this.customQueryInfoList = customQueryInfoList;
		this.queryParameterInfoList = queryParameterInfoList;
		this.idElements = idElements;
		this.namedQueryInfoList = namedQueryInfoList;
	}

	public boolean isAbstract() {
		if (!customQueryInfoList.isEmpty()) {
			return true;
		}
		for (QueryParameterInfo info : queryParameterInfoList) {
			if (!info.generate) {
				return true;
			}
		}
		return false;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy