Package org.jboss.as.cmp.jdbc2

Examples of org.jboss.as.cmp.jdbc2.JDBCStoreManager2


    public static final AttachmentKey<Schema> SCHEMA = AttachmentKey.create(Schema.class);

    public Schema getSchema() {
        schema = deploymentUnit.getAttachment(SCHEMA);
        if (schema == null) {
            schema = new Schema(component.getComponentName());
            deploymentUnit.putAttachment(SCHEMA, schema);
        }
        return schema;
    }
View Full Code Here


        Map<Method, EntityBridgeInvocationHandler.BridgeInvoker> selectorsByMethod = new HashMap<Method, EntityBridgeInvocationHandler.BridgeInvoker>(queries.size());
        for (JDBCQueryMetaData metadata : queries) {
            if (metadata.getMethod().getName().startsWith("ejbSelect")) {
                try {
                    QueryCommand queryCommand = queryFactory.getQueryCommand(metadata.getMethod());
                    Schema schema = ((JDBCStoreManager2) entityBridge.getManager()).getSchema();
                    EJBSelectBridge ejbSelectBridge = new EJBSelectBridge((JDBCStoreManager2) entityBridge.getManager(), entityBridge.getComponent(), schema, metadata, queryCommand);
                    selectorsByMethod.put(metadata.getMethod(), ejbSelectBridge);
                } catch (FinderException e) {
                    throw new RuntimeException(e);
                }
View Full Code Here

    public static final AttachmentKey<Schema> SCHEMA = AttachmentKey.create(Schema.class);

    public Schema getSchema() {
        schema = deploymentUnit.getAttachment(SCHEMA);
        if (schema == null) {
            schema = new Schema(component.getComponentName());
            deploymentUnit.putAttachment(SCHEMA, schema);
        }
        return schema;
    }
View Full Code Here

        Map<Method, EntityBridgeInvocationHandler.BridgeInvoker> selectorsByMethod = new HashMap<Method, EntityBridgeInvocationHandler.BridgeInvoker>(queries.size());
        for (JDBCQueryMetaData metadata : queries) {
            if (metadata.getMethod().getName().startsWith("ejbSelect")) {
                try {
                    QueryCommand queryCommand = queryFactory.getQueryCommand(metadata.getMethod());
                    Schema schema = ((JDBCStoreManager2) entityBridge.getManager()).getSchema();
                    EJBSelectBridge ejbSelectBridge = new EJBSelectBridge((JDBCStoreManager2) entityBridge.getManager(), entityBridge.getComponent(), schema, metadata, queryCommand);
                    selectorsByMethod.put(metadata.getMethod(), ejbSelectBridge);
                } catch (FinderException e) {
                    throw new RuntimeException(e.getMessage());
                }
View Full Code Here

    public static final AttachmentKey<Schema> SCHEMA = AttachmentKey.create(Schema.class);

    public Schema getSchema() {
        schema = deploymentUnit.getAttachment(SCHEMA);
        if (schema == null) {
            schema = new Schema(component.getComponentName());
            deploymentUnit.putAttachment(SCHEMA, schema);
        }
        return schema;
    }
View Full Code Here

        Map<Method, EntityBridgeInvocationHandler.BridgeInvoker> selectorsByMethod = new HashMap<Method, EntityBridgeInvocationHandler.BridgeInvoker>(queries.size());
        for (JDBCQueryMetaData metadata : queries) {
            if (metadata.getMethod().getName().startsWith("ejbSelect")) {
                try {
                    QueryCommand queryCommand = queryFactory.getQueryCommand(metadata.getMethod());
                    Schema schema = ((JDBCStoreManager2) entityBridge.getManager()).getSchema();
                    EJBSelectBridge ejbSelectBridge = new EJBSelectBridge((JDBCStoreManager2) entityBridge.getManager(), entityBridge.getComponent(), schema, metadata, queryCommand);
                    selectorsByMethod.put(metadata.getMethod(), ejbSelectBridge);
                } catch (FinderException e) {
                    throw new RuntimeException(e.getMessage());
                }
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.as.cmp.jdbc2.JDBCStoreManager2

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.