Examples of Adapter


Examples of com.cloudloop.generated.CloudloopConfig.Adapters.Adapter

  CloudloopConfig config = new CloudloopConfig( );
  Adapters adapters = new Adapters( );
  config.setAdapters( adapters );
  List<Adapter> adapterList = adapters.getAdapter( );
 
  Adapter s3Adapter = new Adapter( );
  s3Adapter.setImpl( AmazonS3CloudStore.class.getName( ) );
  s3Adapter.setName( "amazonS3" );
  s3Adapter.setType( AdapterType.STORAGE );
  adapterList.add( s3Adapter );
 
  Adapter nirvanixAdapter = new Adapter( );
  nirvanixAdapter.setImpl( NirvanixCloudStore.class.getName( ) );
  nirvanixAdapter.setName( "nirvanix" );
  nirvanixAdapter.setType( AdapterType.STORAGE );
  adapterList.add( nirvanixAdapter );
 
  Adapter rackspaceAdapter = new Adapter( );
  rackspaceAdapter.setImpl( RackspaceCloudStore.class.getName( ) );
  rackspaceAdapter.setName( "rackspace" );
  rackspaceAdapter.setType( AdapterType.STORAGE );
  adapterList.add( rackspaceAdapter );
 
  Adapter localAdapter = new Adapter( );
  localAdapter.setImpl( LocalCloudStore.class.getName( ) );
  localAdapter.setName( "local" );
  localAdapter.setType( AdapterType.STORAGE );
  adapterList.add( localAdapter );
 
  Adapter jcloudsS3Adapter = new Adapter( );
  jcloudsS3Adapter.setImpl( JS3CloudStore.class.getName( ) );
  jcloudsS3Adapter.setName( "jS3" );
  jcloudsS3Adapter.setType( AdapterType.STORAGE );
  adapterList.add( jcloudsS3Adapter );
 
  Stores stores = new Stores( );
  config.setStores( stores );
  List<Store> storeList = stores.getStore( );
View Full Code Here

Examples of com.dooapp.fxform.adapter.Adapter

    }

    private void updateView(FXFormNode fxFormNode) {
        try {
            Adapter adapter = annotationAdapterProvider.getAdapter(getElement().getWrappedType(), getNode().getProperty().getClass(), getElement(), getNode());
            if (adapter == null) {
                adapter = getFxForm().getAdapterProvider().getAdapter(getElement().getWrappedType(), getNode().getProperty().getClass(), getElement(), getNode());
            }
            fxFormNode.getProperty().setValue(adapter.adaptTo(getElement().getValue()));
        } catch (AdapterException e) {
            logger.log(Level.FINE, e.getMessage(), e);
        }
    }
View Full Code Here

Examples of com.et.ar.adapters.Adapter

            ActiveRecordBase.putConnectionProvider(domainBaseClass, cp);
//            ActiveRecordBase.connections.put(domainBaseClass, cp);
        }
        if (domainBaseClass != null && adapterClass != null){
            try{
                Adapter adapter = (Adapter)Class.forName(adapterClass).newInstance();
                ActiveRecordBase.putConnectionAdapter(domainBaseClass, adapter);
//                ActiveRecordBase.adapters.put(domainBaseClass, (Adapter)Class.forName(adapterClass).newInstance());
            }
            catch(Exception e){
               
View Full Code Here

Examples of com.et.ar.adapters.Adapter

        if (order != null && !order.equals("")){
            sql += " order by " + order;
        }
       
        ConnectionHolder connectionHolder = null;
        Adapter adapter = null;
        String baseClassName = getBaseClassName(clasz);
        if (baseClassName != null) {
          connectionHolder = new ConnectionHolder(clasz);
          adapter = adapters.get(baseClassName);
        } else {
          connectionHolder = new ConnectionHolder(ActiveRecordBase.class);
          adapter = adapters.get(ActiveRecordBase.class.getCanonicalName());
        }
       
        try{
            Connection conn = connectionHolder.getConnection();
            DaoSupport dao = new DaoSupport(conn);
            if (adapter != null){
                if (limit > 0){
                    sql = adapter.getLimitString(sql, limit, offset);
                }
                if (adapter.supportsLimitOffset() == false){
                    return dao.select(clasz, sql, args, 0, offset);
                }
                else{
                    return dao.select(clasz, sql, args, 0, 0);
                }
View Full Code Here

Examples of com.et.ar.adapters.Adapter

    public static List<Map<String,Object>> getResultMap(Class<?> connClass, String sql, Object[] args, String order, int limit, int offset) throws ActiveRecordException {
        if (order != null && !order.equals("")){
            sql += " order by " + order;
        }
       
        Adapter adapter = adapters.get(getBaseClassName(connClass));
       
        ConnectionHolder connectionHolder = new ConnectionHolder(connClass);
        try{
            Connection conn = connectionHolder.getConnection();
            DaoSupport dao = new DaoSupport(conn);
            if (adapter != null){
                if (limit > 0){
                    sql = adapter.getLimitString(sql, limit, offset);
                }
                if (adapter.supportsLimitOffset() == false){
                    return dao.select(sql, args, 0, offset);
                }
                else{
                    return dao.select(sql, args, 0, 0);
                }
View Full Code Here

Examples of com.et.ar.adapters.Adapter

           
            try{
                beginTransaction(clasz);
                beforeCreate();
               
                Adapter adapter = adapters.get(getBaseClassName(clasz));
                ConnectionHolder connectionHolder = new ConnectionHolder(clasz);
                try{
                    DaoSupport dao = new DaoSupport(connectionHolder.getConnection());
                    dao.insert(this, adapter);
                }
View Full Code Here

Examples of com.jengine.orm.db.adapter.Adapter

public class Test {

    public static void main(String [] args) throws Exception {
        ConnectionManager connectionManager = new DBCPConnectionPool(newDBCPDataSource());
//        ConnectionManager connectionManager = new SingleConnectionManager("com.mysql.jdbc.Driver", "jdbc:mysql://localhost:3306/bookdb?", "root", "");
        Adapter adapter = new JDBCAdapter(connectionManager);
        EhcacheManager cacheManager = new EhcacheManager(newEhcacheManager());
        Provider provider = new MySQLProvider(adapter, cacheManager);
        DB db = DBFactory.register(new DB(provider));

        // testing
View Full Code Here

Examples of com.sun.grizzly.tcp.Adapter

     * @throws EndpointRegistrationException
     */
    public static GrizzlyAdapter exposeContext(Set classes, ServerContext sc)
            throws EndpointRegistrationException {

        Adapter adapter = null;

        ResourceConfig rc = new DefaultResourceConfig(classes);

        //Use common classloader. Jersey artifacts are not visible through
        //module classloader
View Full Code Here

Examples of com.sun.xml.bind.v2.model.core.Adapter

/* 119 */     Object t = this.seed.getRawType();
/*     */
/* 122 */     XmlJavaTypeAdapter xjta = getApplicableAdapter(t);
/* 123 */     if (xjta != null) {
/* 124 */       this.isCollection = false;
/* 125 */       this.adapter = new Adapter(xjta, reader(), nav());
/*     */     }
/*     */     else
/*     */     {
/* 129 */       this.isCollection = ((nav().isSubClassOf(t, nav().ref(Collection.class))) || (nav().isArrayButNotByteArray(t)));
/*     */
/* 132 */       xjta = getApplicableAdapter(getIndividualType());
/* 133 */       if (xjta == null)
/*     */       {
/* 135 */         XmlAttachmentRef xsa = (XmlAttachmentRef)this.seed.readAnnotation(XmlAttachmentRef.class);
/* 136 */         if (xsa != null) {
/* 137 */           parent.builder.hasSwaRef = true;
/* 138 */           this.adapter = new Adapter(nav().asDecl(SwaRefAdapter.class), nav());
/*     */         } else {
/* 140 */           this.adapter = null;
/*     */
/* 144 */           xjta = (XmlJavaTypeAdapter)this.seed.readAnnotation(XmlJavaTypeAdapter.class);
/* 145 */           if (xjta != null) {
/* 146 */             Object adapter = reader().getClassValue(xjta, "value");
/* 147 */             parent.builder.reportError(new IllegalAnnotationException(Messages.UNMATCHABLE_ADAPTER.format(new Object[] { nav().getTypeName(adapter), nav().getTypeName(t) }), xjta));
/*     */           }
/*     */
/*     */         }
/*     */
/*     */       }
/*     */       else
/*     */       {
/* 155 */         this.adapter = new Adapter(xjta, reader(), nav());
/*     */       }
/*     */     }
/*     */
/* 159 */     this.id = calcId();
/* 160 */     this.schemaType = Util.calcSchemaType(reader(), this.seed, parent.clazz, getIndividualType(), this);
View Full Code Here

Examples of com.sun.xml.ws.api.server.Adapter

                fixedUrlPatternEndpoints.put(urlPattern, info);
            }
        }

        Adapter getAdapter(String path, String urlPattern) {
            Adapter result = (Adapter) fixedUrlPatternEndpoints.get(path);
            if (result == null) {               
                // This loop is unnecessary.Essentially what it is doing to always
                // return the first element from pathUrlPatternEndpoints
                // TO DO clean up after SCF required
                for (Iterator iter = pathUrlPatternEndpoints.iterator(); iter.hasNext();) {
                    Adapter candidate = (Adapter) iter.next();
                    if (path.startsWith(getValidPathForEndpoint(urlPattern))) {
                        result = candidate;
                        break;
                    }
                }
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.