Examples of readDescriptorRepository()


Examples of org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository()

        MetadataManager metaManager = MetadataManager.getInstance();
        RepositoryPersistor persistor = new RepositoryPersistor();
        URL descriptorUrl = getClass().getClassLoader().getResource(repositoryPath);

        logger.info("Merging OJB respository "+descriptorUrl+" for DAO class "+getClass().getName());
        DescriptorRepository repo = persistor.readDescriptorRepository(descriptorUrl.openStream());
        metaManager.mergeDescriptorRepository(repo);
    }

}
View Full Code Here

Examples of org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository()

        MetadataManager metaManager = MetadataManager.getInstance();
        RepositoryPersistor persistor = new RepositoryPersistor();
        URL descriptorUrl = getClass().getClassLoader().getResource(repositoryPath);

        logger.info("Merging OJB respository "+descriptorUrl+" for DAO class "+getClass().getName());
        DescriptorRepository repo = persistor.readDescriptorRepository(descriptorUrl.openStream());
        metaManager.mergeDescriptorRepository(repo);
    }

}
View Full Code Here

Examples of org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository()

                log("Loading repository file "+_repositoryFile.getAbsolutePath(), Project.MSG_INFO);

                // this will load the info from the specified repository file
                // and merge it with the existing info (if it has been loaded)
                metadataManager.mergeConnectionRepository(persistor.readConnectionRepository(_repositoryFile.getAbsolutePath()));
                metadataManager.mergeDescriptorRepository(persistor.readDescriptorRepository(_repositoryFile.getAbsolutePath()));
            }
            else if (metadataManager.connectionRepository().getAllDescriptor().isEmpty() &&
                     metadataManager.getGlobalRepository().getDescriptorTable().isEmpty())
            {
                // Seems nothing was loaded, probably because we're not starting in the directory
View Full Code Here

Examples of org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository()

                if (!repositoryFile.exists())
                {
                    repositoryFile = new File(_ojbPropertiesFile.getParentFile(), repositoryPath);
                }
                metadataManager.mergeConnectionRepository(persistor.readConnectionRepository(repositoryFile.getAbsolutePath()));
                metadataManager.mergeDescriptorRepository(persistor.readDescriptorRepository(repositoryFile.getAbsolutePath()));
            }
            // we might have to determine the default pb key ourselves
            if (metadataManager.getDefaultPBKey() == null)
            {
                for (Iterator it = metadataManager.connectionRepository().getAllDescriptor().iterator(); it.hasNext();)
View Full Code Here

Examples of org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository()

                public void run()
                {
                    try
                    {
                        RepositoryPersistor persistor = new RepositoryPersistor ();
                        DescriptorRepository repository = persistor.readDescriptorRepository(selectedFile.getCanonicalPath());
                        JIFrmOJBRepository frm = new JIFrmOJBRepository(repository);
                        containingFrame.getContentPane().add(frm);
                        frm.setVisible(true);
                    }
                    catch (Throwable t)
View Full Code Here

Examples of org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository()

    private TorqueTableGenerator tableGenerator;

    public TorqueRepositoryGenerator(String xmlInputFile, boolean ignoreAutoIncrement) throws Exception
    {
        RepositoryPersistor persistor = new RepositoryPersistor();
        DescriptorRepository repository = persistor.readDescriptorRepository(xmlInputFile);

        this.tablePreprocessor = new TorqueTablePreprocessor(repository);
        this.tablePreprocessor.buildStandardTables();
        this.tableGenerator = new TorqueTableGenerator(repository, ignoreAutoIncrement);
    }
View Full Code Here

Examples of org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository()

    private TorqueTableGenerator tableGenerator;

    public TorqueRepositoryGenerator(String xmlInputFile, boolean ignoreAutoIncrement) throws Exception
    {
        RepositoryPersistor persistor = new RepositoryPersistor();
        DescriptorRepository repository = persistor.readDescriptorRepository(xmlInputFile);

        this.tablePreprocessor = new TorqueTablePreprocessor(repository);
        this.tablePreprocessor.buildStandardTables();
        this.tableGenerator = new TorqueTableGenerator(repository, ignoreAutoIncrement);
    }
View Full Code Here

Examples of org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository()

        super(name);
    }

    public void setUp() throws Exception {
        RepositoryPersistor repositoryPersistor = new RepositoryPersistor();
        this.repository = repositoryPersistor.readDescriptorRepository(INPUT_FILE);
        this.torqueRepositoryGenerator = new TorqueRepositoryGenerator(INPUT_FILE, false);
    }

    public void tearDown() throws Exception {
        this.torqueRepositoryGenerator = null;
View Full Code Here

Examples of org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository()

        super(name);
    }

    public void setUp() throws Exception {
        RepositoryPersistor repositoryPersistor = new RepositoryPersistor();
        DescriptorRepository descriptorRepository = repositoryPersistor.readDescriptorRepository(EXAMPLE_FILE);
        this.torqueTablePreprocessor = new TorqueTablePreprocessor(descriptorRepository);
    }

    public void tearDown() throws Exception {
        this.torqueTablePreprocessor = null;
View Full Code Here

Examples of org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository()

        super(name);
    }

    public void setUp() throws Exception {
        RepositoryPersistor repositoryPersistor = new RepositoryPersistor();
        DescriptorRepository descriptorRepository = repositoryPersistor.readDescriptorRepository(EXAMPLE_FILE);
        this.foreignKeyGenerator = new TorqueForeignKeyGenerator(descriptorRepository);
    }

    public void tearDown() throws Exception {
        this.foreignKeyGenerator = null;
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.