Examples of from()


Examples of javax.persistence.criteria.CriteriaQuery.from()

    private List<Nodes> findNodesEntities(boolean all, int maxResults, int firstResult) {
        EntityManager em = getEntityManager();
        try {
            CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
            cq.select(cq.from(Nodes.class));
            Query q = em.createQuery(cq);
            if (!all) {
                q.setMaxResults(maxResults);
                q.setFirstResult(firstResult);
            }
View Full Code Here

Examples of javax.persistence.criteria.CriteriaUpdate.from()

    }

    public void updateMovie() {
        CriteriaBuilder builder = em.getCriteriaBuilder();
        CriteriaUpdate updateCriteria = builder.createCriteriaUpdate(Movie.class);
        Root<Movie> updateRoot = updateCriteria.from(Movie.class);
        updateCriteria.where(builder.equal(updateRoot.get(Movie_.name), "Inception"));
        updateCriteria.set(updateRoot.get(Movie_.name), "INCEPTION");
        Query q = em.createQuery(updateCriteria);
        q.executeUpdate();
        em.flush();
View Full Code Here

Examples of javax.persistence.criteria.Subquery.from()

                        else {
                            /*
                             * Create subquery to find by attribute
                             */
                            Subquery subquery = cq.subquery(attr.getJavaType());
                            Root fromAttr = subquery.from(attr.getJavaType());
                            subquery.select(fromAttr.get(NamingConstants.ID));

                            if (var instanceof String && ((String)var).contains("%")) {
                                /*
                                 * This is a like query
View Full Code Here

Examples of javax.validation.groups.ConvertGroup.from()

                    }
                }

                if (ConvertGroup.class.isInstance(a)) {
                    final ConvertGroup convertGroup = ConvertGroup.class.cast(a);
                    edesc.addGroupConversion(new GroupConversionDescriptorImpl(new Group(convertGroup.from()), new Group(convertGroup.to())));
                }
            }
            annotations.clear();
        }
View Full Code Here

Examples of jodd.mail.Email.from()

  protected boolean send(SendMailSession mailSession, EmailMessage msg) {
    try {
      log.debug("send email");

      Email email = new Email();
      email.from(msg.getSource()).to(msg.getDestination()).subject(msg.getSubject());

      emailBuilder.applyTemplate(email, msg);

      mailSession.sendMail(email);
View Full Code Here

Examples of net.minecraftforge.gradle.tasks.ReplaceJavadocsTask.from()

        project.getArtifacts().add("archives", inst);

        final File javadocSource = project.file(delayedFile("{BUILD_DIR}/tmp/javadocSource"));
        ReplaceJavadocsTask jdSource = makeTask("replaceJavadocs", ReplaceJavadocsTask.class);
        {
            jdSource.from(delayedFile(MCPC_SOURCES));
            jdSource.from(delayedFile(ECLIPSE_MCPC_SRC));
            jdSource.setOutFile(delayedFile("{BUILD_DIR}/tmp/javadocSource"));
            jdSource.setMethodsCsv(delayedFile(METHODS_CSV));
            jdSource.setFieldsCsv(delayedFile(FIELDS_CSV));
        }
View Full Code Here

Examples of net.minecraftforge.gradle.tasks.abstractutil.DelayedJar.from()

        final DelayedJar uni = makeTask("packageUniversal", DelayedJar.class);
        {
            uni.setClassifier("universal");
            uni.getInputs().file(delayedFile(DevConstants.JSON_REL));
            uni.getOutputs().upToDateWhen(Constants.CALL_FALSE);
            uni.from(delayedZipTree(DevConstants.BINPATCH_TMP));
            uni.from(delayedFileTree(DevConstants.FML_RESOURCES));
            uni.from(delayedFile(DevConstants.FML_VERSIONF));
            uni.from(delayedFile(DevConstants.FML_LICENSE));
            uni.from(delayedFile(DevConstants.FML_CREDITS));
            uni.from(delayedFile(DevConstants.DEOBF_DATA));
View Full Code Here

Examples of net.minecraftforge.gradle.tasks.abstractutil.ExtractTask.from()

        // COPY CLEAN STUFF
        ExtractTask task = makeTask("extractMcResources", ExtractTask.class);
        {
            task.exclude(JAVA_FILES);
            task.setIncludeEmptyDirs(false);
            task.from(delayedFile(DevConstants.REMAPPED_CLEAN));
            task.into(delayedFile(DevConstants.ECLIPSE_CLEAN_RES));
            task.dependsOn("extractWorkspace", "remapCleanJar");
        }

        Copy copy = makeTask("copyStart", Copy.class);
View Full Code Here

Examples of net.pterodactylus.sone.database.PostBuilder.from()

    if (!sone.isLocal()) {
      logger.log(Level.FINE, String.format("Tried to create post for non-local Sone: %s", sone));
      return null;
    }
    PostBuilder postBuilder = database.newPostBuilder();
    postBuilder.from(sone.getId()).randomId().withTime(time).withText(text.trim());
    if (recipient.isPresent()) {
      postBuilder.to(recipient.get().getId());
    }
    final Post post = postBuilder.build();
    database.storePost(post);
View Full Code Here

Examples of net.sourceforge.purrpackage.test.demo.junitng.MixedFrameworks.from()

  @Test
  public void testHere() {
    MixedFrameworks x = new MixedFrameworks();
    x.fromTestNGElsewhere();
    x.from( true, false );
  }
 
}
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.