@Override @SuppressWarnings("unchecked") public <T, ID> JpaEntityInformation<T, ID> getEntityInformation(Class<T> domainClass) { return (JpaEntityInformation<T, ID>) JpaEntityInformationSupport.getEntityInformation(domainClass, entityManager); }
@Override public String getEntityName() { return entityName != null ? entityName : super.getEntityName(); }
@Override public boolean isNew(T entity) { if (!versionAttribute.isPresent() || versionAttribute.map(Attribute::getJavaType).map(Class::isPrimitive).orElse(false)) { return super.isNew(entity); } BeanWrapper wrapper = new DirectFieldAccessFallbackBeanWrapper(entity); return versionAttribute.map(it -> wrapper.getPropertyValue(it.getName()) == null).orElse(true); }
public GenericRepositoryImpl(Class<E> domainClass, EntityManager em) { this(JpaEntityInformationSupport.getMetadata(domainClass, em), em); }
/** * Creates a new {@link SimpleJpaRepository} to manage objects of the given domain type. * * @param domainClass must not be {@literal null}. * @param em must not be {@literal null}. */ public SimpleJpaRepository(Class<T> domainClass, EntityManager em) { this(JpaEntityInformationSupport.getEntityInformation(domainClass, em), em); }
@Override public boolean isNew(T entity) { if (!versionAttribute.isPresent() || versionAttribute.map(Attribute::getJavaType).map(Class::isPrimitive).orElse(false)) { return super.isNew(entity); } BeanWrapper wrapper = new DirectFieldAccessFallbackBeanWrapper(entity); return versionAttribute.map(it -> wrapper.getPropertyValue(it.getName()) == null).orElse(true); }
@Override public String getEntityName() { return entityName != null ? entityName : super.getEntityName(); }
@Override @SuppressWarnings("unchecked") public <T, ID> JpaEntityInformation<T, ID> getEntityInformation(Class<T> domainClass) { return (JpaEntityInformation<T, ID>) JpaEntityInformationSupport.getEntityInformation(domainClass, entityManager); }
/** * Creates a new {@link SimpleJpaRepository} to manage objects of the given domain type. * * @param domainClass must not be {@literal null}. * @param em must not be {@literal null}. */ public SimpleJpaRepository(Class<T> domainClass, EntityManager em) { this(JpaEntityInformationSupport.getEntityInformation(domainClass, em), em); }
public SoftDeletesRepositoryImpl(Class<T> domainClass, EntityManager em) { super(domainClass, em); this.em = em; this.domainClass = domainClass; this.entityInformation = JpaEntityInformationSupport.getEntityInformation(domainClass, em); }
public EntityInformation getEntityInformation(Class<?> entityClass, EntityManager em) { return JpaEntityInformationSupport.getEntityInformation(entityClass, em); } }
/** 指定したクラスのエンティティ情報を返します ( ID 概念含む ) */ @SuppressWarnings("unchecked") public static <T> JpaEntityInformation<T, Serializable> entityInformation(EntityManager em, Class<T> clazz) { return (JpaEntityInformation<T, Serializable>)JpaEntityInformationSupport.getEntityInformation(clazz, em); }
@Autowired public SysUserRoleEODao(EntityManager entityManager) { super(JpaEntityInformationSupport.getEntityInformation(SysUserRoleEO.class, entityManager), entityManager); }
@Autowired public SysEventEODao(EntityManager entityManager) { super(JpaEntityInformationSupport.getEntityInformation(SysEventEO.class, entityManager), entityManager); }
@Autowired public CodeGenTableEODao(EntityManager entityManager) { super(JpaEntityInformationSupport.getEntityInformation(CodeGenTableEO.class, entityManager), entityManager); }
@Autowired public FlowAuditItemDetailEODao (EntityManager entityManager) { super(JpaEntityInformationSupport.getEntityInformation(FlowAuditItemDetailEO.class, entityManager), entityManager); }
@Autowired public UserManagerEODao(EntityManager entityManager) { super(JpaEntityInformationSupport.getEntityInformation(UserManagerEO.class, entityManager), entityManager); }
@Autowired public SysMenuEODao(EntityManager entityManager) { super(JpaEntityInformationSupport.getEntityInformation(SysMenuEO.class, entityManager), entityManager); }
@Autowired public MsgMessageEODao(EntityManager entityManager) { super(JpaEntityInformationSupport.getEntityInformation(MsgMessageEO.class, entityManager), entityManager); }
@Autowired public UserContactInfoDao(EntityManager entityManager) { super(JpaEntityInformationSupport.getEntityInformation(UserContactInfoEO.class, entityManager), entityManager); }