Package javax.persistence.metamodel

Examples of javax.persistence.metamodel.EntityType


        List results = new ArrayList<E>();

        MetamodelImpl metaModel =
            (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(entityMetadata.getPersistenceUnit());

        EntityType entityType = metaModel.entity(entityClass);

        List<AbstractManagedType> subManagedType = ((AbstractManagedType) entityType).getSubManagedType();
        try {
            if (!subManagedType.isEmpty()) {
                for (AbstractManagedType subEntity : subManagedType) {
View Full Code Here


        try {
            MetamodelImpl metaModel =
                (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                    entityMetadata.getPersistenceUnit());

            EntityType entityType = metaModel.entity(entityClass);

            List<AbstractManagedType> subManagedType = ((AbstractManagedType) entityType).getSubManagedType();

            if (!subManagedType.isEmpty()) {
                for (AbstractManagedType subEntity : subManagedType) {
View Full Code Here

                        MetamodelImpl metaModel =
                            (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                                metadata.getPersistenceUnit());

                        EntityType entityType = metaModel.entity(node.getDataClass());

                        List<HBaseDataWrapper> embeddableData = new ArrayList<HBaseDataHandler.HBaseDataWrapper>();

                        hTable = ((HBaseDataHandler) handler).gethTable(metadata.getSchema());
                        ((HBaseDataHandler) handler).preparePersistentData(metadata.getSchema(),
                            metadata.getTableName(), entity, rowKey, metaModel, entityType.getAttributes(),
                            columnWrapper, embeddableData);

                        List<HBaseDataWrapper> dataSet = null;
                        if (data.containsKey(hTable)) {
                            dataSet = data.get(metadata.getTableName());
View Full Code Here

    private List<AbstractManagedType> getSubManagedType(Class entityClass, EntityMetadata entityMetadata) {
        MetamodelImpl metaModel =
            (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(entityMetadata.getPersistenceUnit());

        EntityType entityType = metaModel.entity(entityClass);

        List<AbstractManagedType> subManagedType = ((AbstractManagedType) entityType).getSubManagedType();
        return subManagedType;
    }
View Full Code Here

        HTableInterface hTable = gethTable(tableName);

        MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                m.getPersistenceUnit());

        EntityType entityType = metaModel.entity(m.getEntityClazz());

        Set<Attribute> attributes = entityType.getAttributes();

        if (metaModel.isEmbeddable(m.getIdAttribute().getBindableJavaType()))
        {
            rowId = KunderaCoreUtils.prepareCompositeKey(m, rowId);
        }
View Full Code Here

            // Populate columns data

            MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                    m.getPersistenceUnit());
            EntityType entityType = metaModel.entity(m.getEntityClazz());

            Set<Attribute> attributes = entityType.getAttributes();

            String discrColumn = ((AbstractManagedType) entityType).getDiscriminatorColumn();
            String discrValue = ((AbstractManagedType) entityType).getDiscriminatorValue();

            if (discrColumn != null && hbaseData.getColumnValue(discrColumn) != null && discrValue != null)
View Full Code Here

            String qualifier) throws IOException, InstantiationException, IllegalAccessException
    {
        List returnedResults = new ArrayList();
        MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                m.getPersistenceUnit());
        EntityType entityType = metaModel.entity(m.getEntityClazz());
        Set<Attribute> attributes = entityType.getAttributes();
        String[] columns = new String[attributes.size() - 1];
        int count = 0;
        boolean isCollection = false;
        for (Attribute attr : attributes)
        {
View Full Code Here

     * @see javax.persistence.metamodel.Metamodel#entity(java.lang.Class)
     */
    @Override
    public <X> EntityType<X> entity(Class<X> paramClass)
    {
        EntityType entityType = entityTypes.get(paramClass);
        if (entityType == null)
        {
            throw new IllegalArgumentException("Not an entity, {class:" + paramClass + "}");
        }
        return entityType;
View Full Code Here

     */
    public Attribute getEntityAttribute(Class clazz, String fieldName)
    {
        if (entityTypes != null && entityTypes.containsKey(clazz))
        {
            EntityType entityType = entityTypes.get(clazz);
            return entityType.getAttribute(fieldName);
        }
        throw new IllegalArgumentException("No entity found: " + clazz);
    }
View Full Code Here

    {
        Map<String, EmbeddableType> embeddableAttibutes = new HashMap<String, EmbeddableType>();

        if (entityTypes != null)
        {
            EntityType entity = entityTypes.get(clazz);
            Iterator<Attribute> iter = entity.getAttributes().iterator();
            while (iter.hasNext())
            {
                Attribute attribute = iter.next();
                if (isEmbeddable(((AbstractAttribute) attribute).getBindableJavaType()))
                {
View Full Code Here

TOP

Related Classes of javax.persistence.metamodel.EntityType

Copyright © 2018 www.massapicom. 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.