Package org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl

Examples of org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.SqlTypeWithMethods


        String schemaPattern = escapePunctuation(originalSchemaPattern, true);
        final String procedurePattern = escapePunctuation(originalProcedurePattern, true);
        if (schemaPattern == null || schemaPattern.length() == 0) {
            schemaPattern = username;
        }
        SqlTypeWithMethods typ = null;
        if (procedureModel.getJPubType() == null) {
            SqlReflector sqlReflector = new SqlReflector(connection,username);
            int whatItIs = IS_PACKAGE;
            if (TOPLEVEL.equalsIgnoreCase(packageName)) {
                whatItIs = IS_TOPLEVEL;
                packageName = "";
            }
            try {
                typ = (SqlTypeWithMethods)sqlReflector.addSqlUserType(schemaPattern,
                    packageName, whatItIs, true, 0, 0, new MethodFilter() {
                        public boolean acceptMethod(ProcedureMethod method, boolean preApprove) {
                            String methodName = method.getName();
                            if (sqlMatch(procedurePattern, methodName)) {
                                return true;
                            }
                            return false;
                        }

                    }
                );
                procedureModel.setJPubType(typ);
            }
            catch (Exception e) {
                // TODO
            }
        }
        else {
            typ = procedureModel.getJPubType();
        }
        List<ProcedureMethod> methods = null;
        try {
            methods = typ.getDeclaredMethods();
        }
        catch (Exception e) {
            // TODO
        }
        if (methods.size() > 0) {
View Full Code Here


        String schemaPattern = escapePunctuation(originalSchemaPattern, true);
        final String procedurePattern = escapePunctuation(originalProcedurePattern, true);
        if (schemaPattern == null || schemaPattern.length() == 0) {
            schemaPattern = username;
        }
        SqlTypeWithMethods typ = null;
        if (procedureModel.getJPubType() == null) {
            SqlReflector sqlReflector = new SqlReflector(connection,username);
            int whatItIs = IS_PACKAGE;
            if (TOPLEVEL.equalsIgnoreCase(packageName)) {
                whatItIs = IS_TOPLEVEL;
                packageName = "";
            }
            try {
                typ = (SqlTypeWithMethods)sqlReflector.addSqlUserType(schemaPattern,
                    packageName, whatItIs, true, 0, 0, new MethodFilter() {
                        public boolean acceptMethod(ProcedureMethod method, boolean preApprove) {
                            String methodName = method.getName();
                            if (sqlMatch(procedurePattern, methodName)) {
                                return true;
                            }
                            return false;
                        }

                    }
                );
                procedureModel.setJPubType(typ);
            }
            catch (Exception e) {
                // TODO
            }
        }
        else {
            typ = procedureModel.getJPubType();
        }
        List<ProcedureMethod> methods = null;
        try {
            methods = typ.getDeclaredMethods();
        }
        catch (Exception e) {
            // TODO
        }
        if (methods.size() > 0) {
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.SqlTypeWithMethods

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.