Examples of PersistentEntity


Examples of com.activequant.domainmodel.PersistentEntity

                if(map.containsKey("CLASSNAME")){
                  Class<PersistentEntity> clazz;
          try {
            clazz = (Class<PersistentEntity>)
                Class.forName((String)map.get("CLASSNAME"));
            PersistentEntity pe = clazz.newInstance();
            pe.initFromMap(map);
            msgRecEvent.fire(pe);
          } catch (ClassNotFoundException e) {
            log.warn("Map containing classname, but could not instantiate it. ", e);
          } catch (InstantiationException e) {
            e.printStackTrace();
View Full Code Here

Examples of org.paquitosoft.lml.model.annotation.PersistentEntity

     */
    public static String getTableName(Class entityClass) {
       
        String result = entityClass.getSimpleName();
       
        PersistentEntity att = (PersistentEntity) entityClass.getAnnotation(PersistentEntity.class);
        if (att != null && att.tableName().length() > 0) {
            result = att.tableName();
        }
       
        return result.toUpperCase();
    }
View Full Code Here

Examples of org.paquitosoft.lml.model.annotation.PersistentEntity

     * @param entityClass
     * @return <b>true</b> when entity's primary key is generated by the database
     */
    public static boolean isEntityPKGeneratedByDatabase(Class entityClass) {
        boolean result = true;
        PersistentEntity pr = (PersistentEntity) entityClass.getAnnotation(PersistentEntity.class);
        if (pr != null && pr.generateKey()) {
            result = false;
        }
        return result;
    }
View Full Code Here

Examples of org.springframework.data.mapping.PersistentEntity

        this.lightAdminConfiguration = lightAdminConfiguration;
        this.configuration = configuration;
    }

    public FileManipulationStrategy createForFileProperty(PersistentProperty persistentProperty) {
        PersistentEntity persistentEntity = persistentProperty.getOwner();

        if (isOfBinaryFileType(persistentProperty)) {
            return createBinaryFileManipulationStrategy();
        }
View Full Code Here

Examples of org.springframework.data.mapping.PersistentEntity

        return configurationUnit;
    }

    @SuppressWarnings("unchecked")
    private ConfigurationUnitVisitor<VisitableConfigurationUnit>[] configurationUnitVisitor(ConfigurationUnit configurationUnit) {
        final PersistentEntity persistentEntity = getPersistentEntity(configurationUnit);
        return new ConfigurationUnitVisitor[]{
                new EntityMetadataConfigurationUnitVisitor(persistentEntity),
                new FieldSetConfigurationUnitVisitor(persistentEntity),
                new FiltersConfigurationUnitVisitor(persistentEntity)
        };
View Full Code Here

Examples of org.springframework.data.mapping.PersistentEntity

    @SuppressWarnings("unchecked")
    public Collection<? extends DomainConfigurationProblem> validateFieldMetadata(PersistentFieldMetadata fieldMetadata, Class<?> domainType, DomainConfigurationValidationContext validationContext) {
        MappingContext mappingContext = validationContext.getMappingContext();
        final LightAdminConfiguration lightAdminConfiguration = validationContext.getLightAdminConfiguration();

        final PersistentEntity persistentEntity = mappingContext.getPersistentEntity(domainType);

        PersistentProperty persistentProperty = persistentEntity.getPersistentProperty(fieldMetadata.getField());

        if (persistentProperty == null) {
            return newArrayList(validationContext.notPersistableFieldProblem(fieldMetadata.getName()));
        }
View Full Code Here

Examples of org.springframework.data.mapping.PersistentEntity

    }

    public DomainTypeBasicConfiguration createNonManagedDomainTypeConfiguration(Class<?> domainType) {
        JpaRepository repository = new SimpleJpaRepository(domainType, entityManager);

        PersistentEntity persistentEntity = mappingContext.getPersistentEntity(domainType);

        DefaultEntityMetadataConfigurationUnitBuilder builder = new DefaultEntityMetadataConfigurationUnitBuilder(domainType);

        builder.nameExtractor(EntityNameExtractorFactory.forPersistentEntity(persistentEntity));
View Full Code Here

Examples of org.springframework.data.mapping.PersistentEntity

    public static String entityId(DomainTypeAdministrationConfiguration domainTypeAdministrationConfiguration, Object entity) {
        if (entity == null) {
            return null;
        }

        PersistentEntity persistentEntity = domainTypeAdministrationConfiguration.getPersistentEntity();
        PersistentProperty idProperty = persistentEntity.getIdProperty();

        BeanWrapper beanWrapper = new DirectFieldAccessFallbackBeanWrapper(entity);

        return String.valueOf(beanWrapper.getPropertyValue(idProperty.getName()));
    }
View Full Code Here

Examples of org.springframework.data.mapping.PersistentEntity

        return globalAdministrationConfiguration;
    }

    private void registerAssociationDomainTypeConfigurations(DomainTypeAdministrationConfiguration domainTypeAdministrationConfiguration, final GlobalAdministrationConfiguration globalAdministrationConfiguration) {
        PersistentEntity persistentEntity = domainTypeAdministrationConfiguration.getPersistentEntity();

        persistentEntity.doWithAssociations(new SimpleAssociationHandler() {
            @Override
            public void doWithAssociation(Association<? extends PersistentProperty<?>> association) {
                Class<?> associationDomainType = association.getInverse().getActualType();

                if (!isManagedEntity(associationDomainType) && repositories.hasRepositoryFor(associationDomainType)) {
View Full Code Here

Examples of org.springframework.data.mapping.PersistentEntity

    }

    private PersistentProperty attributeMetadata(Class<?> domainType, String field) {
        DomainTypeAdministrationConfiguration domainTypeAdministrationConfiguration = configuration.forManagedDomainType(domainType);

        PersistentEntity persistentEntity = domainTypeAdministrationConfiguration.getPersistentEntity();

        return persistentEntity.getPersistentProperty(field);
    }
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.