Package com.mobixess.jodb.core.transaction.JODBSession

Examples of com.mobixess.jodb.core.transaction.JODBSession.ClassDescriptor.newInstance()


        if (persistentDataContainer.isArray()) {
            return Array.newInstance(type, persistentDataContainer.getActiveFieldsIterator().getRemainingInCurrentCategory());
        }
           
        try {
            return classDescriptor.newInstance();
        } catch (IllegalClassTypeException e) {
            throw new JodbIOException(e);
        }
    }
View Full Code Here


        if(originalDescriptor.isInnerClass()){
            Field outerInstanceAccessField = originalDescriptor.getOuterRefField();
            outerInstance = outerInstanceAccessField!=null ? outerInstanceAccessField.get(originalPredicate) : null;
        }
        ClassDescriptor synthetiClassDescriptor = session.getDescriptorForClass(syntheticPredicate, false);
        return synthetiClassDescriptor.newInstance(outerInstance);
        //Constructor<>
    }
   
    @SuppressWarnings("unchecked")
    public boolean isOptimizedQuery(JODBSession session, Predicate predicate, Comparator comparator) throws IOException{
View Full Code Here

       
        public SyntheticSubject(JODBOperationContext context, INqLoader loader, Class syntheticPredicateSubjectClass) throws Exception {
            JODBSession session = context.getSession();
            Field proxyField = loader.getSyntheticProxySetMethod();
            ClassDescriptor syntheticPredicateSubjectClassDescriptor = session.getDescriptorForClass(syntheticPredicateSubjectClass, true, proxyField);
            _syntheticSubject = syntheticPredicateSubjectClassDescriptor.newInstance();
            _dataObjectProxy = new NQueryDataObjectProxy();
            proxyField.set(_syntheticSubject, _dataObjectProxy);
            //setProxyMethod.invoke(_syntheticSubject, _dataObjectProxy);
            _dataObjectProxy.setTargetClass(context, syntheticPredicateSubjectClassDescriptor);
        }
View Full Code Here

            JODBSession session = _sessionContainer.getSession();
            Predicate predicate;
            Comparator comparator = null;
            try {
                ClassDescriptor predicateClassDescriptor = session.getDescriptorForClass(predicateClassName);
                predicate = (Predicate) predicateClassDescriptor.newInstance();
                if (comparatorClassName != null) {
                    ClassDescriptor comparatorClassDescriptor = session.getDescriptorForClass(comparatorClassName);
                    comparator = (Comparator) comparatorClassDescriptor.newInstance();
                }
            } catch (Exception e) {
View Full Code Here

            try {
                ClassDescriptor predicateClassDescriptor = session.getDescriptorForClass(predicateClassName);
                predicate = (Predicate) predicateClassDescriptor.newInstance();
                if (comparatorClassName != null) {
                    ClassDescriptor comparatorClassDescriptor = session.getDescriptorForClass(comparatorClassName);
                    comparator = (Comparator) comparatorClassDescriptor.newInstance();
                }
            } catch (Exception e) {
                throw new JodbIOException(e);
            }
            return NQExecutor.getInstance().isOptimizedQuery(_sessionContainer.getSession(), predicate, comparator);
View Full Code Here

            JODBSession session = _sessionContainer.getSession();
            Predicate predicate;
            Comparator comparator = null;
            try {
                ClassDescriptor predicateClassDescriptor = session.getDescriptorForClass(predicateClassName);
                predicate = (Predicate) predicateClassDescriptor.newInstance();
                if (comparatorClassName != null) {
                    ClassDescriptor comparatorClassDescriptor = session.getDescriptorForClass(comparatorClassName);
                    comparator = (Comparator) comparatorClassDescriptor.newInstance();
                }
            } catch (Exception e) {
View Full Code Here

            try {
                ClassDescriptor predicateClassDescriptor = session.getDescriptorForClass(predicateClassName);
                predicate = (Predicate) predicateClassDescriptor.newInstance();
                if (comparatorClassName != null) {
                    ClassDescriptor comparatorClassDescriptor = session.getDescriptorForClass(comparatorClassName);
                    comparator = (Comparator) comparatorClassDescriptor.newInstance();
                }
            } catch (Exception e) {
                throw new JodbIOException(e);
            }
            JODBQueryList objectSet =  (JODBQueryList) NQExecutor.getInstance().execute(_sessionContainer.getSession(), predicate, comparator);
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.