Examples of Store


Examples of org.apache.openjpa.persistence.annotations.common.apps.annotApp.annotype.Store

        try{
            startTx(em);
   
            Site site = em.find(Site.class, pkey);
   
            Store store = new Store();
            store.setPartyId(pkey);
            store.setStoreDescription("storeDescription");
            store.setStoreName("storeName");
            store.setStatus("1");
            store.setArchiveStatus("1");
            store.setCreateDate(new Date());
            store.setSiteId(site.getPartyId());
            store.setSite(site);
   
            List<Store> stores = new ArrayList<Store>();
            stores.add(store);
            site.setStores(stores);
   
View Full Code Here

Examples of org.apache.servicemix.store.Store

            connection.close();
        }
    }
   
    public void testStoreAndLoad() throws Exception {
        Store store = factory.open("store");
        String id = store.store(new Integer(10));
        Integer i = (Integer) store.load(id);
        assertEquals(10, i.intValue());
        assertNull(store.load(id));
        assertNull(store.load("a"));
    }
View Full Code Here

Examples of org.apache.slide.projector.Store

        Value orderParameter = (Value)parameter.get(TableHandler.ORDER);
        String sortedBy = null, order = null;
        if ( sortedByParameter != NullValue.NULL ) sortedBy = sortedByParameter.toString();
        if ( orderParameter != NullValue.NULL ) order = orderParameter.toString();
        String id = parameter.get(TableHandler.ID).toString();
        Store store = context.getStore(StoreHelper.getStoreByName(parameter.get(TableHandler.STORE).toString()));
        MapValue idResource = (MapValue)store.get(id);
        Map tableMap;
        if ( idResource == null) {
            tableMap = new HashMap();
            MapValue tableState = new MapValue(tableMap);
            store.put(id, tableState);
        } else {
            tableMap = idResource.getMap();
            NumberValue offset = (NumberValue)idResource.getMap().get(TableHandler.CURRENT_POSITION);
            if ( offset != null ) offsetResource = offset;
            NumberValue itemsPerPage = (NumberValue)idResource.getMap().get(ITEMS_PER_PAGE);
View Full Code Here

Examples of org.apache.slide.store.Store

                              Hashtable childStores)
        throws ServiceRegistrationFailedException,
        ServiceParameterErrorException, ServiceParameterMissingException {
        if (!stores.containsKey(scope)) {
            try {
                Store store = (Store) storeClass.newInstance();
                store.setName(storeName);
                store.setParameters(parameters);
                stores.put(scope, store);
               
                // Now assigning the child stores
                Object nodeStore = childStores.get(NODE_STORE);
                if (nodeStore instanceof String) {
                    // Resolving reference
                    store.setNodeStore((NodeStore) childStores.get(nodeStore));
                } else {
                    store.setNodeStore((NodeStore) nodeStore);
                }
               
                Object securityStore = childStores.get(SECURITY_STORE);
                if (securityStore instanceof String) {
                    // Resolving reference
                    store.setSecurityStore
                        ((SecurityStore) childStores.get(securityStore));
                } else {
                    store.setSecurityStore
                        ((SecurityStore) securityStore);
                }
               
                Object lockStore = childStores.get(LOCK_STORE);
                if (lockStore instanceof String) {
                    store.setLockStore
                        ((LockStore) childStores.get(lockStore));
                } else {
                    store.setLockStore((LockStore) lockStore);
                }
               
                Object revisionDescriptorsStore = childStores
                    .get(REVISION_DESCRIPTORS_STORE);
                if (revisionDescriptorsStore instanceof String) {
                    store.setRevisionDescriptorsStore
                        ((RevisionDescriptorsStore) childStores
                             .get(revisionDescriptorsStore));
                } else {
                    store.setRevisionDescriptorsStore
                        ((RevisionDescriptorsStore) revisionDescriptorsStore);
                }
               
                Object revisionDescriptorStore = childStores
                    .get(REVISION_DESCRIPTOR_STORE);
                if (revisionDescriptorStore instanceof String) {
                    store.setRevisionDescriptorStore
                        ((RevisionDescriptorStore) childStores
                             .get(revisionDescriptorStore));
                } else {
                    store.setRevisionDescriptorStore
                        ((RevisionDescriptorStore) revisionDescriptorStore);
                }
               
                Object contentStore = childStores.get(CONTENT_STORE);
                if (contentStore instanceof String) {
                    // Resolving reference
                    store.setContentStore
                        ((ContentStore) childStores.get(contentStore));
                } else {
                    store.setContentStore((ContentStore) contentStore);
                }
               
                // set the scope in the father and child stores
                store.setScope(scope);
               
                // call the create_store_listener
                notifyStoreCreated( this.name, scope.toString(), storeName );
               
            } catch(InstantiationException e) {
View Full Code Here

Examples of org.bouncycastle.util.Store

            X509Certificate cert = (X509Certificate) readCert(args[2]);
            System.out.println("Certificate read sucessfully");

            ContentSigner sha256Signer = new JcaContentSignerBuilder("SHA256withRSA").setProvider("BC").build(key);

            Store certs = certToStore(cert);

            generator.addCertificates(certs);
            generator.addSignerInfoGenerator(
                          new JcaSignerInfoGeneratorBuilder(
                                new JcaDigestCalculatorProviderBuilder().setProvider("BC").build())
View Full Code Here

Examples of org.cipango.j2ee.session.Store

    protected void setUpDistributableSessionManager(ClassLoader loader)
    {
        try
        {
            Manager sm = getDistributableSessionManager();
            Store store=sm.getStore();
            if(store instanceof AbstractReplicatedStore)
                ((AbstractReplicatedStore)store).setLoader(loader);
            if(_timeOutPresent)
                sm.setMaxInactiveInterval(_timeOutMinutes*60);
            getSessionHandler().setSessionManager(sm);
View Full Code Here

Examples of org.cruxframework.crux.core.client.db.annotation.Store

 
  protected void getIndexesFromObject(JClassType objectStoreTarget, Set<IndexData> indexesCreated, String objectStoreName)
    {
      if (objectStoreTarget != null)
    {
        Store store = objectStoreTarget.getAnnotation(Store.class);
        if (store != null)
        {
          getIndexesFromMetadata(store.indexes(), indexesCreated, objectStoreName);

          List<IndexData> indexes = getIndexFromAnnotations(objectStoreTarget, "");
          for (IndexData index: indexes)
          {
            if (indexesCreated.contains(index.keyPath[0]))
View Full Code Here

Examples of org.elasticsearch.index.store.Store

        NodeEnvironment nodeEnvironment = new NodeEnvironment(settings, environment);
        ByteBufferCache byteBufferCache = new ByteBufferCache(settings);

        ShardId shardId = new ShardId(new Index("index"), 1);
        String type = args.length > 0 ? args[0] : "ram";
        Store store;
        if (type.equalsIgnoreCase("ram")) {
            store = new RamStore(shardId, settings, null);
        } else if (type.equalsIgnoreCase("simple-fs")) {
            store = new SimpleFsStore(shardId, settings, new SimpleFsIndexStore(shardId.index(), settings, null, nodeEnvironment), byteBufferCache);
        } else if (type.equalsIgnoreCase("mmap-fs")) {
            store = new NioFsStore(shardId, settings, new NioFsIndexStore(shardId.index(), settings, null, nodeEnvironment), byteBufferCache);
        } else if (type.equalsIgnoreCase("nio-fs")) {
            store = new MmapFsStore(shardId, settings, new MmapFsIndexStore(shardId.index(), settings, null, nodeEnvironment), byteBufferCache);
        } else if (type.equalsIgnoreCase("memory")) {
            store = new ByteBufferStore(shardId, settings, null, byteBufferCache);
        } else {
            throw new IllegalArgumentException("No type store [" + type + "]");
        }
        System.out.println("Using Store [" + store + "]");
        store.deleteContent();
        SimpleStoreBenchmark simpleStoreBenchmark = new SimpleStoreBenchmark(store)
                .numberStaticFiles(5).staticFileSize(new ByteSizeValue(5, ByteSizeUnit.MB))
                .dynamicFileSize(new ByteSizeValue(1, ByteSizeUnit.MB))
                .readerThreads(5).readerIterations(10)
                .writerThreads(2).writerIterations(10)
                .build();
        simpleStoreBenchmark.run();
        store.close();
    }
View Full Code Here

Examples of org.fcrepo.server.storage.lowlevel.defaultstore.Store

        Map<String, Object> objConfig = new HashMap<String, Object>();
        objConfig.putAll(configuration);
        objConfig.put(REGISTRY_NAME, OBJECT_REGISTRY_TABLE);
        objConfig.put("storeBase", objectStoreBase);
        objConfig.put("storeBases", new String[] {objectStoreBase});
        objectStore = new Store(objConfig);

        Map<String, Object> dsConfig = new HashMap<String, Object>();
        dsConfig.putAll(configuration);
        dsConfig.put(REGISTRY_NAME, DATASTREAM_REGISTRY_TABLE);
        dsConfig.put("storeBase", datastreamStoreBase);
        dsConfig.put("storeBases", new String[] {datastreamStoreBase});
        datastreamStore = new Store(dsConfig);
    }
View Full Code Here

Examples of org.hibernate.search.annotations.Store

        if ( metadata.fieldIndex.get( propertyIndex ).isIndexed() ) {
          return true;
        }

        // take care of stored fields:
        Store store = metadata.fieldStore.get( propertyIndex );
        if ( store.equals( Store.YES ) || store.equals( Store.COMPRESS ) ) {
          // unless Store.NO, which doesn't affect the index
          return true;
        }
      }
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.