Examples of newObject()


Examples of org.apache.cayenne.ObjectContext.newObject()

    public void testChangeEventOnPeerChangeSecondNestingLevel() throws Exception {
        DataContext context = createDataContext();

        ObjectContext childPeer1 = context.createChildContext();

        Artist a = childPeer1.newObject(Artist.class);
        a.setArtistName("X");
        childPeer1.commitChanges();

        final MockChannelListener listener = new MockChannelListener();
        EventUtil.listenForChannelEvents((DataChannel) childPeer1, listener);
View Full Code Here

Examples of org.apache.cayenne.access.DataContext.newObject()

                SoftTest.class).getDbEntity();
       
        try {
            context.getParentDataDomain().setQueryBuilderFactory(new SoftDeleteQueryBuilderFactory());
           
            final SoftTest test = context.newObject(SoftTest.class);
            test.setName("SoftDeleteBatchQueryBuilderTest");
            context.commitChanges();
           
            final SelectQuery query = new SelectQuery(SoftTest.class);
           
View Full Code Here

Examples of org.apache.cayenne.access.DataContext.newObject()

    }

    public void testLongPk() throws Exception {

        DataContext context = createDataContext();
        Artist a = context.newObject(Artist.class);
        a.setArtistName("XXX");

        updateId(context, a.getObjectId());

        Object pk = a.getObjectId().getReplacementIdMap().get(Artist.ARTIST_ID_PK_COLUMN);
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.ResultAccessor.newObject()

                if (selectStatement.isAnAggregateQuery()) {
                    this.getResultSet().getAggregateRecord().applyValues(result);
                }
                else {
                    final T val = (T)resultAccessor.newObject(rs.getHConnectionImpl(),
                                                              selectStatement.getMappingContext(),
                                                              selectStatement.getSelectElementList(),
                                                              rs.getMaxVersions(),
                                                              result);
View Full Code Here

Examples of org.cojen.classfile.CodeBuilder.newObject()

            b.returnValue(TypeDesc.BOOLEAN);
        } else if (methodType == TRY_READ_METHOD) {
            b.loadNull();
            b.returnValue(TypeDesc.OBJECT);
        } else {
            b.newObject(TypeDesc.forClass(NoSuchPropertyException.class));
            b.dup();
            b.loadLocal(propertyVar);
            b.loadConstant(methodType == READ_METHOD);

            // Params to invoke NoSuchPropertyException.<init>.
View Full Code Here

Examples of org.cojen.classfile.CodeBuilder.newObject()

                cf.addDefaultConstructor();
            }

            // Now define the method that constructs the object.
            CodeBuilder b = new CodeBuilder(cf.addMethod(method));
            b.newObject(TypeDesc.forClass(objectType));
            b.dup();
            int count = b.getParameterCount();
            for (int i=0; i<count; i++) {
                b.loadLocal(b.getParameter(i));
            }
View Full Code Here

Examples of org.deuce.transaction.AbstractContext.newObject()

   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      new GlobalObject(this, ((AbstractDistinguishable)this).getId())// publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
 
  public Object getId() {
    return id;
  }
View Full Code Here

Examples of org.jboss.profiler.aop.logger.FileProfileLogger.newObject()

    public void testNewObject() throws Exception {
        ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream(1024);
        FileProfileLogger logger = new FileProfileLogger(arrayOutput);

        for (int i=0;i<100;i++) {
            logger.newObject(1,1,1,1,1);
            logger.releaseObject(1,1);
        }

        ByteArrayInputStream input = new ByteArrayInputStream(arrayOutput.toByteArray());
        SpyFileReader reader = new SpyFileReader(input,false);
View Full Code Here

Examples of org.mozilla.javascript.Context.newObject()

    public DOMSource invoke(DOMSource request) {
        DOMSource response = new DOMSource();
        Context cx = Context.enter();
        try {
            Scriptable scope = cx.newObject(scriptScope);
            scope.setPrototype(scriptScope);
            scope.setParentScope(null);
            Node node = request.getNode();
            Object inDoc = null;
            if (isE4X) {
View Full Code Here

Examples of org.mozilla.javascript.Context.newObject()

            if (isE4X) {
                try {
                    Object xo = XmlObject.Factory.parse(node);
                    inDoc = Context.toObject(xo, scope);
                    Object[] args = {inDoc};
                    inDoc = cx.newObject(scriptScope, "XML", args);
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            } else {
                inDoc = Context.toObject(node, scope);
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.