Examples of create()


Examples of org.milowski.db.DBConnection.create()

         throw new NoSuchAlgorithmException("Algorithm "+algorithm+" is not supported.");
      }
      DBConnection connection = db.getConnection();
      try {
         connection.deleteById(AuthDB.DELETE_AUTHENTICATION_BY_USER, id);
         connection.create(AuthDB.CREATE_AUTHENTICATION, -1,new DBUpdateHandler() {
            public void prepare(PreparedStatement s)
               throws SQLException
            {
               s.setInt(1,id);
               s.setString(2,value);

Examples of org.milyn.scribe.invoker.DaoInvokerFactory.create()

    DaoInvokerFactory factory  = DaoInvokerFactory.getInstance();

    @SuppressWarnings("unchecked")
    Dao<Object> daoMock = mock(Dao.class);

    DaoInvoker daoInvoker = factory.create(daoMock, objectStore);

    assertNotNull(daoInvoker);

    Object entity = new Object();

Examples of org.milyn.scribe.reflection.AnnotatedDaoRuntimeInfoFactory.create()

      if(annotatedClass.isAnnotationPresent(org.milyn.scribe.annotation.Dao.class)) {

        final AnnotatedDaoRuntimeInfoFactory repository = getAnnotatedDAORuntimeInfoRepository(objectStore);

        return new AnnotatedDaoInvoker(dao, repository.create(dao.getClass()));

      } else {
        throw new IllegalArgumentException("The DAO object doesn't implement any of the DAO interfaces " +
            "or is annotated with the [" + org.milyn.scribe.annotation.Dao.class.getName() + "] annotation");
      }

Examples of org.mockito.cglib.proxy.Enhancer.create()

        ReflectionEntryPointResolver resolver = new ReflectionEntryPointResolver();

        Enhancer e = new Enhancer();
        e.setSuperclass(WaterMelon.class);
        e.setCallback(new DummyMethodCallback());
        Object proxy = e.create();

        MuleEventContext context = getTestEventContext("Blah");
        InvocationResult result = resolver.invoke(proxy, context);
        assertEquals(result.getState(), InvocationResult.State.SUCCESSFUL);
    }

Examples of org.modeshape.jcr.value.BinaryFactory.create()

                switch (this.type) {
                    case PropertyType.STRING:
                        return this.getString().equals(that.getString());
                    case PropertyType.BINARY:
                        BinaryFactory binaryFactory = factories().getBinaryFactory();
                        BinaryValue thisValue = binaryFactory.create(this.value);
                        BinaryValue thatValue = binaryFactory.create(that.value);
                        return thisValue.equals(thatValue);
                    case PropertyType.BOOLEAN:
                        return this.getBoolean() == that.getBoolean();
                    case PropertyType.DOUBLE:

Examples of org.modeshape.jcr.value.DateTimeFactory.create()

        Matcher matcher = RepositoryConfiguration.INITIAL_TIME_PATTERN.matcher(initialTimeExpression);
        if (matcher.matches()) {
            int hours = Integer.decode(matcher.group(1));
            int mins = Integer.decode(matcher.group(2));
            DateTimeFactory factory = runningState().context().getValueFactories().getDateFactory();
            DateTime now = factory.create();
            DateTime initialTime = factory.create(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth(), hours, mins, 0, 0);
            long delay = initialTime.getMilliseconds() - System.currentTimeMillis();
            if (delay <= 0L) {
                initialTime = initialTime.plusDays(1);
                delay = initialTime.getMilliseconds() - System.currentTimeMillis();

Examples of org.modeshape.jcr.value.NameFactory.create()

        NameFactory nameFactory = getContext().getValueFactories().getNameFactory();
        Name[] rpts = new Name[requiredPrimaryTypes.length];
        for (int i = 0; i < requiredPrimaryTypes.length; i++) {
            try {
                rpts[i] = nameFactory.create(requiredPrimaryTypes[i]);
            } catch (ValueFormatException vfe) {
                throw new ConstraintViolationException(vfe);
            }
        }

Examples of org.modeshape.jcr.value.PathFactory.create()

        throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException,
        UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
        checkNotProtected();

        PathFactory pathFactory = session.pathFactory();
        Path relPathAsPath = pathFactory.create(relPath);
        if (relPathAsPath.isAbsolute()) throw new RepositoryException(JcrI18n.invalidRelativePath.text(relPath));
        Path actualPath = pathFactory.create(path(), relPathAsPath).getCanonicalPath();

        versionManager().restoreAtAbsPath(session.stringFactory().create(actualPath), version, removeExisting, false);
    }

Examples of org.modeshape.jcr.value.PropertyFactory.create()

            }
        }

        // We can create the child, so start by building the required properties ...
        PropertyFactory propFactory = session.propertyFactory();
        Property ptProp = propFactory.create(JcrLexicon.PRIMARY_TYPE, childPrimaryNodeTypeName);

        if (JcrNtLexicon.UNSTRUCTURED.equals(childPrimaryNodeTypeName)) {
            // This is very common, and we know they don't have auto-created properties or children ...
            MutableCachedNode newChild = mutable().createChild(cache, desiredKey, childName, ptProp);

Examples of org.modeshape.jcr.value.ReferenceFactory.create()

            NodeKeyReference ref = (NodeKeyReference)value;
            NodeKey key = ref.getNodeKey();
            NodeKey converted = documentIdToNodeKey(sourceName, key.toString());
            boolean foreign = !converted.getSourceKey().equals(localSourceKey);
            ReferenceFactory factory = ref.isWeak() ? translator.getReferenceFactory() : translator.getReferenceFactory();
            return factory.create(converted, foreign);
        } else if (value instanceof StringReference) {
            StringReference ref = (StringReference)value;
            NodeKey converted = documentIdToNodeKey(sourceName, ref.toString());
            boolean foreign = !converted.getSourceKey().equals(localSourceKey);
            ReferenceFactory factory = ref.isWeak() ? translator.getReferenceFactory() : translator.getReferenceFactory();
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.