Examples of findById()


Examples of org.chromattic.api.ChromatticSession.findById()

   {
      ChromatticSession session = persister.getSession();
      RegistrationSPI registration = null;
      try
      {
         ConsumerMapping cm = session.findById(ConsumerMapping.class, consumer.getPersistentKey());
         RegistrationMapping rm = cm.createAndAddRegistrationMappingFrom(null);
         registration = newRegistrationSPI(consumer, registrationProperties, rm.getPersistentKey());
         rm.initFrom(registration);
         persister.closeSession(session, true);
      }
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findById()

   }

   private void remove(String id, Class clazz)
   {
      ChromatticSession session = persister.getSession();
      session.remove(session.findById(clazz, id));
      persister.closeSession(session, true);
   }

   @Override
   protected ConsumerSPI internalCreateConsumer(String consumerId, String consumerName)
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findById()

      ConsumerSPI consumerSPI = super.internalSaveChangesTo(consumer);

      ChromatticSession session = persister.getSession();
      try
      {
         ConsumerMapping cm = session.findById(ConsumerMapping.class, consumer.getPersistentKey());
         cm.initFrom(consumer);
         persister.closeSession(session, true);
      }
      catch (Exception e)
      {
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findById()

      try
      {
         ChromatticSession session = persister.getSession();

         // retrieve the mapping associated with the persistence key and if it exists, reset it to the data of the specified ProducerInfo
         ProducerInfoMapping pim = session.findById(ProducerInfoMapping.class, key);
         if (pim == null)
         {
            throw new IllegalArgumentException("Couldn't find ProducerInfoMapping associated with key " + key);
         }
         oldId = pim.getId();
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findById()

      if (reg != null)
      {
         try
         {
            final ChromatticSession session = persister.getSession();
            final RegistrationMapping mapping = session.findById(RegistrationMapping.class, registrationId);
            session.remove(mapping);
            persister.save();
         }
         finally
         {
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findById()

      RegistrationSPI registration = super.internalCreateRegistration(consumer, registrationProperties);
      try
      {
         ChromatticSession session = persister.getSession();

         ConsumerMapping cm = session.findById(ConsumerMapping.class, consumer.getPersistentKey());
         RegistrationMapping rm = cm.createAndAddRegistrationMappingFrom(null);
         rm.initFrom(registration);
         registration.setPersistentKey(rm.getPersistentKey());

         persister.save();
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findById()

      try
      {
         ChromatticSession session = persister.getSession();

         ConsumerMapping cm = session.findById(ConsumerMapping.class, consumer.getPersistentKey());
         cm.initFrom(consumerSPI);

         persister.save();
      }
      catch (Exception e)
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findById()

      try
      {
         ChromatticSession session = persister.getSession();

         RegistrationMapping cm = session.findById(RegistrationMapping.class, registration.getPersistentKey());
         cm.initFrom(registrationSPI);

         persister.save();
      }
      catch (Exception e)
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findById()

      try
      {
         final ChromatticSession session = persister.getSession();

         final RegistrationMapping mapping = session.findById(RegistrationMapping.class, registrationId);
         if (mapping == null)
         {
            return null;
         }
         else
View Full Code Here

Examples of org.cipres.treebase.service.AbstractService.findByID()

  @SuppressWarnings("unchecked")
  public void setResultIDs(Collection<Long> ids) {
    AbstractService service = getService();
    makeEmpty();
    for (Long id : ids) {
      E obj = (E) service.findByID(getResultClass(), id);
      getResults().add(obj);
    }
  }
}
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.