Examples of create()


Examples of org.gudy.azureus2.core3.torrent.TOTorrentCreator.create()

    if(pieceSizeStr != null) {
      try {    
        long pieceSize = 1l << Integer.parseInt(pieceSizeStr);
        TOTorrentCreator creator = TOTorrentFactory.createFromFileOrDirWithFixedPieceLength(fSrc,url,pieceSize);
        creator.addListener( this );
        torrent = creator.create();
      }catch(Exception e) {
        e.printStackTrace();
        return;
      }
    } else {

Examples of org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloaderFactory.create()

    try{
      ResourceDownloaderFactory rdf = plugin_interface.getUtilities().getResourceDownloaderFactory();
   
      URL sl_url = new URL( SECONDARY_LOOKUP + "magnetLookup?hash=" + Base32.encode( hash ) + (args.length()==0?"":("&args=" + UrlUtils.encode( args ))));
     
      ResourceDownloader rd = rdf.create( sl_url );
     
      rd.addListener(
        new ResourceDownloaderAdapter()
        {
          public boolean

Examples of org.gudy.azureus2.ui.swt.plugins.UISWTParameterContext.create()

          UISWTParameterContext context = (UISWTParameterContext)((UIParameterImpl)param).getContext();
          Composite internal_composite = new Composite(current_composite, SWT.NULL);
          GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
          internal_composite.setLayoutData(gridData);
          boolean initialised_component = true;
          try {context.create(internal_composite);}
          catch (Exception e) {Debug.printStackTrace(e); initialised_component = false;}
         
          if (initialised_component) {
            swt_param = new UISWTParameter(internal_composite, param.getKey());
          }

Examples of org.hibernate.ogm.datastore.neo4j.impl.EmbeddedGraphDatabaseFactory.create()

    EmbeddedGraphDatabaseFactory factory = new EmbeddedGraphDatabaseFactory();
    Properties properties = new Properties();
    properties.put( Neo4jProperties.DATABASE_PATH, dbLocation );
    properties.put( Neo4jProperties.CONFIGURATION_RESOURCE_NAME, neo4jPropertiesUrl().toExternalForm() );
    factory.initialize( properties );
    factory.create().shutdown();
  }

  @Test
  public void testLoadPropertiesFromFilePath() throws Exception {
    EmbeddedGraphDatabaseFactory factory = new EmbeddedGraphDatabaseFactory();

Examples of org.hibernate.repackage.cglib.proxy.Enhancer.create()

                    return Integer.valueOf(13);
                }
                return proxy.invokeSuper(obj, args);
            }
        });
        BeanInterfaceHib bean = (BeanInterfaceHib) enh.create();
        ObjectMapper mapper = new ObjectMapper();
        Map<String,Object> result = writeAndMap(mapper, bean);
        assertEquals(1, result.size());
        assertEquals(Integer.valueOf(13), result.get("x"));
    }

Examples of org.hibernate.tool.hbm2ddl.SchemaExport.create()

    boolean export = false; // don't update databse   
    try {
      SchemaExport se = new SchemaExport(cf);
      se.setOutputFile(outputFile);
      se.setDelimiter(";");
      se.create(script, export);
    } catch (Exception e) {
      log.error("DDL export to file failed: Reason: ", e);
    }
  }
}

Examples of org.hivedb.meta.persistence.HiveSemaphoreDao.create()

public class TestHiveSemaphorePersistence extends HiveTest {
 
  @Test
  public void testUpdate() throws Exception {
    HiveSemaphoreDao hsd = new HiveSemaphoreDao(getDataSource(getConnectString(getHiveDatabaseName())));
    HiveSemaphore hs = hsd.create();
    hs.incrementRevision();
    hsd.update(hs);
   
    HiveSemaphore hs2 = hsd.get();
    Assert.assertEquals(hs.getRevision(),hs2.getRevision());

Examples of org.hivedb.meta.persistence.NodeDao.create()

    assertEquals(count, dao.loadAll().size());

    Node full = createFullyPopulatedNode();
    Node minimal = createMinimalNode();

    dao.create(full);
    dao.create(minimal);

    List<Node> nodes = dao.loadAll();
    assertEquals(2 + count, nodes.size());

Examples of org.hivedb.meta.persistence.PartitionDimensionDao.create()

  @Test
  public void testCreate() throws Exception {
    PartitionDimensionDao dao = new PartitionDimensionDao(getDataSource(getConnectString(getHiveDatabaseName())));
    int initialSize = dao.loadAll().size();
    final PartitionDimension d = new PartitionDimension(Hive.NEW_OBJECT_ID, getHive().getPartitionDimension().getName(), Types.INTEGER, getConnectString(getHiveDatabaseName()), new ArrayList<Resource>());
    dao.create(d);
    assertTrue(d.getId() > 0);
    assertEquals(initialSize + 1, dao.loadAll().size());
  }
}

Examples of org.hivedb.meta.persistence.ResourceDao.create()

 
  @Test
  public void testCreate() throws Exception {
    ResourceDao d = new ResourceDao(getDataSource(getConnectString(getHiveDatabaseName())));
    int intitialSize = d.loadAll().size();
    d.create(createResource());
    assertEquals(intitialSize+1,d.loadAll().size());
  }
}
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.