Package org.jboss.ejb.plugins.cmp.jdbc2.bridge

Examples of org.jboss.ejb.plugins.cmp.jdbc2.bridge.JDBCEntityBridge2


        typeFactory = new JDBCTypeFactory(metaData.getTypeMapping(),
                metaData.getJDBCApplication().getValueClasses(),
                metaData.getJDBCApplication().getUserTypeMappings()
        );

        entityBridge = new JDBCEntityBridge2(this, metaData);
        entityBridge.init();

        Catalog catalog = getCatalog();
        catalog.addEntity(entityBridge);
View Full Code Here


        typeFactory = new JDBCTypeFactory(metaData.getTypeMapping(),
                metaData.getJDBCApplication().getValueClasses(),
                metaData.getJDBCApplication().getUserTypeMappings()
        );

        entityBridge = new JDBCEntityBridge2(this, metaData);
        entityBridge.init();

        Catalog catalog = getCatalog();
        catalog.addEntity(entityBridge);
View Full Code Here

        typeFactory = new JDBCTypeFactory(metaData.getTypeMapping(),
                metaData.getJDBCApplication().getValueClasses(),
                metaData.getJDBCApplication().getUserTypeMappings()
        );

        entityBridge = new JDBCEntityBridge2(this, metaData);
        entityBridge.init();

        Catalog catalog = getCatalog();
        catalog.addEntity(entityBridge);
View Full Code Here

    private void initResultReader(JDBCEntityBridge2 entity, JDBCDeclaredQueryMetaData metadata) {
        String entityName = metadata.getEJBName();
        if (entityName != null) {
            Catalog catalog = entity.getManager().getCatalog();
            JDBCEntityBridge2 otherEntity = (JDBCEntityBridge2) catalog.getEntityByEJBName(entityName);
            if (otherEntity == null) {
                throw new RuntimeException("Unknown entity: " + entityName);
            }
            this.entity = otherEntity;
        } else {
View Full Code Here

    private void initResultReader(JDBCEntityBridge2 entity, JDBCDeclaredQueryMetaData metadata) {
        String entityName = metadata.getEJBName();
        if (entityName != null) {
            Catalog catalog = entity.getManager().getCatalog();
            JDBCEntityBridge2 otherEntity = (JDBCEntityBridge2) catalog.getEntityByEJBName(entityName);
            if (otherEntity == null) {
                throw MESSAGES.unknownEntity(entityName);
            }
            this.entity = otherEntity;
        } else {
View Full Code Here

        typeFactory = new JDBCTypeFactory(metaData.getTypeMapping(),
                metaData.getJDBCApplication().getValueClasses(),
                metaData.getJDBCApplication().getUserTypeMappings()
        );

        entityBridge = new JDBCEntityBridge2(this, metaData);
        entityBridge.init();

        Catalog catalog = getCatalog();
        catalog.addEntity(entityBridge);
View Full Code Here

      return metadata.getMethod();
   }

   public Object execute(Object[] args) throws FinderException
   {
      JDBCStoreManager2 manager = command.getStoreManager();
      GenericEntityObjectFactory factory = (metadata.isResultTypeMappingLocal() ?
         (GenericEntityObjectFactory)manager.getContainer().getLocalProxyFactory() : manager.getContainer().getProxyFactory());

      Object result;
      switch(returnType)
      {
         case SINGLE:
View Full Code Here

            if(value != null)
            {
               changeValue(null);

               final Object relatedId = value.getPrimaryKey();
               final JDBCStoreManager2 relatedManager = (JDBCStoreManager2)relatedEntity.getManager();

               if(!relatedManager.isCascadeDeleted(relatedId))
               {
                  value.remove();
               }
            }
View Full Code Here

/*  718 */         if (value != null)
/*      */         {
/*  720 */           changeValue(null);
/*      */
/*  722 */           Object relatedId = value.getPrimaryKey();
/*  723 */           JDBCStoreManager2 relatedManager = (JDBCStoreManager2)JDBCCMRFieldBridge2.this.relatedEntity.getManager();
/*      */
/*  725 */           if (!relatedManager.isCascadeDeleted(relatedId))
/*      */           {
/*  727 */             value.remove();
/*      */           }
/*      */         }
/*      */
View Full Code Here

/* 100 */     return this.metadata.getMethod();
/*     */   }
/*     */
/*     */   public Object execute(Object[] args) throws FinderException
/*     */   {
/* 105 */     JDBCStoreManager2 manager = this.command.getStoreManager();
/* 106 */     GenericEntityObjectFactory factory = this.metadata.isResultTypeMappingLocal() ? manager.getContainer().getLocalProxyFactory() : manager.getContainer().getProxyFactory();
/*     */     Object result;
/* 110 */     switch (this.returnType)
/*     */     {
/*     */     case 0:
/* 113 */       result = this.command.fetchOne(this.schema, factory, args);
View Full Code Here

TOP

Related Classes of org.jboss.ejb.plugins.cmp.jdbc2.bridge.JDBCEntityBridge2

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.