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

com.gtcgroup.justify.jpa.po.JstFindJpaPO Maven / Gradle / Ivy

Go to download

JPA MODULE: PED Central is the home for the open-source �Justify� suite of software engineering modules. Justify seeks API alignment between Java 1.8+ application code and JUnit 5 test code.

There is a newer version: 8.5.0-alpha5
Show newest version
/*
 * [Licensed per the Open Source "MIT License".]
 *
 * Copyright (c) 2006 - 2017 by
 * Global Technology Consulting Group, Inc. at
 * http://gtcGroup.com
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
package com.gtcgroup.justify.jpa.po;

import java.util.Map;

import javax.persistence.EntityManager;

import com.gtcgroup.justify.jpa.po.internal.BaseJpaPO;

/**
 * This Parameter Object class supports find operations.
 *
 * 

* Copyright (c) 2006 - 2017 by Global Technology Consulting Group, Inc. at * gtcGroup.com . *

* * @author Marvin Toll * @since v.6.2 */ public class JstFindJpaPO extends BaseJpaPO { /** * This method initializes the class. * * @return {@link JstFindJpaPO} */ public static JstFindJpaPO withFind(final boolean suppressExceptionForNull) { return new JstFindJpaPO(suppressExceptionForNull); } /** * This method initializes the class. * * @return {@link JstFindJpaPO} */ public static JstFindJpaPO withFind() { return new JstFindJpaPO(false); } private Class entityClass; private Object entityIdentity; private Object populatedEntityContainingIdentity; /** * Constructor */ protected JstFindJpaPO(final boolean suppressExceptionForNull) { super(suppressExceptionForNull); return; } /** * @return {@link Class} */ public Class getEntityClass() { return this.entityClass; } /** * @return {@link Object} */ public Object getEntityIdentity() { return this.entityIdentity; } /** * @return {@link Object} */ public Object getPopulatedEntityContainingIdentity() { return this.populatedEntityContainingIdentity; } /** * @return boolean */ public boolean isPopulatedEntityContainingIdentity() { return null != this.populatedEntityContainingIdentity; } /** * @return {@link JstFindJpaPO} */ @SuppressWarnings("unchecked") public JstFindJpaPO withEntityClass(final Class entityClass) { this.entityClass = (Class) entityClass; return this; } /** * @return {@link JstFindJpaPO} */ public JstFindJpaPO withEntityIdentity(final Object entityIdentity) { this.entityIdentity = entityIdentity; return this; } /** * @return {@link JstFindJpaPO} */ public JstFindJpaPO withEntityManager(final EntityManager entityManager) { return (JstFindJpaPO) super.withEntityManager(entityManager); } /** * @return {@link JstFindJpaPO} */ @Override public JstFindJpaPO withPersistenceUnitName(final String persistenceUnitName) { return (JstFindJpaPO) super.withPersistenceUnitName(persistenceUnitName); } /** * @return {@link JstFindJpaPO} */ public JstFindJpaPO withPersistencePropertyMap(final Map persistencePropertyMap) { return (JstFindJpaPO) super.withPersistencePropertyMap(persistencePropertyMap); } /** * @return {@link JstFindJpaPO} */ public JstFindJpaPO withPopulatedEntityContainingIdentity(final Object populatedEntityContainingIdentity) { this.populatedEntityContainingIdentity = populatedEntityContainingIdentity; return this; } /** * @return {@link JstFindJpaPO} */ public JstFindJpaPO withSuppressForceDatabaseTrip(final boolean suppress) { return (JstFindJpaPO) super.withSuppressForceDatabaseTrip(suppress); } }