Package de.nava.informa.core

Examples of de.nava.informa.core.ChannelGroupIF


   * @throws PersistenceManagerException in case of any problems.
   */
  public ChannelGroupIF createGroup(String title) throws PersistenceManagerException {

    // Create new group in persistent storage
    ChannelGroupIF group = super.createGroup(title);

    // Save new group in local cache
    groups.put(new Long(group.getId()), group);

    return group;
  }
View Full Code Here


    // So, when lost of groups required and we have not read it from Hibernate yet
    // then we do so and put the groups we don't have yet in our cache in it.
    if (!groupsRead) {
      final ChannelGroupIF[] hibernateGroups = super.getGroups();
      for (int i = 0; i < hibernateGroups.length; i++) {
        final ChannelGroupIF hibernateGroup = hibernateGroups[i];
        final Long groupId = new Long(hibernateGroup.getId());
        if (!groups.containsKey(groupId)) {
          groups.put(groupId, hibernateGroup);
        }
      }
View Full Code Here

  public final void deleteChannel(ChannelIF channel) {
    // remove all associations with parent groups
    if (channel instanceof Channel) {
      final ChannelGroupIF[] groupsList = ((Channel) channel).getParentGroups();
      for (int i = 0; i < groupsList.length; i++) {
        ChannelGroupIF group = groupsList[i];

        removeChannelFromGroup(channel, group);
      }
    }
View Full Code Here

   */
  public ChannelGroupIF createGroup(String title)
    throws PersistenceManagerException {

    // Create group object
    final ChannelGroupIF group = new ChannelGroup(title);
    HibernateUtil.saveObject(group);

    return group;
  }
View Full Code Here

      groups = groupsList.toArray(new ChannelGroupIF[0]);

      // At this step we load all internal collections (channels and items in channels) as
      // we will be detached from the session in the client application.
      for (int i = 0; i < groups.length; i++) {
        ChannelGroupIF group = groups[i];
        initGroupCollections(group);
      }
    } catch (Exception e) {
      LOG.log(Level.SEVERE, "Could not read the list of groups.", e);
      throw new PersistenceManagerException("Could not read the list of groups.", e);
View Full Code Here

  private ItemIF[] deleteChannel(ChannelIF channel, ChannelGroupIF[] groups, final Session session)
    throws PersistenceManagerException {

    // Remove channel from all groups
    for (int i = 0; i < groups.length; i++) {
      ChannelGroupIF group = groups[i];
      if (group.getAll().contains(channel)) {
        group.remove(channel);
        HibernateUtil.updateObject(group, session);
      }
    }

    // Delete all items
View Full Code Here

  public void init(Properties props) throws ChannelBuilderException {
    logger.debug("initialising channel builder for hibernate backend");
  }

  public ChannelGroupIF createChannelGroup(String title) {
    ChannelGroupIF obj = new ChannelGroup(title);
    save(obj);
    return obj;
  }
View Full Code Here

TOP

Related Classes of de.nava.informa.core.ChannelGroupIF

Copyright © 2018 www.massapicom. 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.