Package org.hibernate.persister.entity

Examples of org.hibernate.persister.entity.AbstractEntityPersister


    void addClassProperties(ClassMetadata meta, ArrayList<HashMap<String, Object>> dataArrayList, ArrayList<HashMap<String, Object>> navArrayList)
    {
        // maps column names to their related data properties.  Used in MakeAssociationProperty to convert FK column names to entity property names.
        HashMap<String, HashMap<String, Object>> relatedDataPropertyMap = new HashMap<String, HashMap<String, Object>>();

        AbstractEntityPersister persister = (AbstractEntityPersister) meta;
        Class type = meta.getMappedClass();
        HashSet<String> inheritedProperties = getSuperProperties(persister);

        String[] propNames = meta.getPropertyNames();
        Type[] propTypes = meta.getPropertyTypes();
View Full Code Here


    protected void verifyHibernateConfig() throws Exception {
        new HibernateTxFragment() {
        protected void txFragment(Session session) throws Exception {
            Map metadata = session.getSessionFactory().getAllClassMetadata();
            for (Iterator i = metadata.values().iterator(); i.hasNext();) {
                final AbstractEntityPersister persister = (AbstractEntityPersister) i.next();
                final String className = persister.getName();
                if (!ArrayUtils.contains(verificationExcludedClassNames, className)) {
                    log.debug("Verifying: " + className);
                    new HibernateTxFragment(true) {
                    protected void txFragment(Session session) throws Exception {
                        try {
                            boolean usingOracle = isOracleDatabase();
                            Query query = session.createQuery("from " + className + " c " + (usingOracle ? " where rownum < 6" : ""));
                            if (!usingOracle) query.setMaxResults(5);
                            query.list();
                        }
                        catch (Exception e) {
                            log.error("Structure verification error for class " + className);
                            log.error("Error seems to affect table named " + persister.getTableName());
                            log.error("The following stack trace may help you to determine the current error cause: ", e);
                        }
                    }}.execute();
                }
            }
View Full Code Here

TOP

Related Classes of org.hibernate.persister.entity.AbstractEntityPersister

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.