org.jasig.portal.channel.dao.jpa
Class JpaChannelTypeDao

java.lang.Object
  extended by org.jasig.portal.channel.dao.jpa.JpaChannelTypeDao
All Implemented Interfaces:
IChannelTypeDao

public class JpaChannelTypeDao
extends Object
implements IChannelTypeDao

JPA/Hibernate implementation of IChannelTypeDao. This DAO handles channel types and is not yet integrated with the channel definition persistence code.

Author:
Jen Bourey, jbourey@unicon.net

Constructor Summary
JpaChannelTypeDao()
           
 
Method Summary
 IChannelType createChannelType(String name, String clazz, String cpdUri)
          Creates, initializes and persists a new IChannelType based on the specified parameters
 void deleteChannelType(IChannelType type)
          Removes the specified IChannelType from the persistent store.
 IChannelType getChannelType(int id)
          Get a IChannelType for the specified id.
 IChannelType getChannelType(String name)
          Get a IChannelType for the specified name
 List<IChannelType> getChannelTypes()
           
 void setEntityManager(EntityManager entityManager)
           
 IChannelType updateChannelType(IChannelType type)
          Persists changes to a IChannelType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpaChannelTypeDao

public JpaChannelTypeDao()
Method Detail

setEntityManager

public void setEntityManager(EntityManager entityManager)
Parameters:
entityManager - the entityManager to set

deleteChannelType

@Transactional
public void deleteChannelType(IChannelType type)
Description copied from interface: IChannelTypeDao
Removes the specified IChannelType from the persistent store.

Specified by:
deleteChannelType in interface IChannelTypeDao
Parameters:
type - The type to remove.

createChannelType

@Transactional
public IChannelType createChannelType(String name,
                                                    String clazz,
                                                    String cpdUri)
Description copied from interface: IChannelTypeDao
Creates, initializes and persists a new IChannelType based on the specified parameters

Specified by:
createChannelType in interface IChannelTypeDao
Parameters:
name - The name of the channel type
clazz - The Java Class the type represents
cpdUri - The URI to the CPD file used when publishing channels of this type
Returns:
A newly created, initialized and persisted IChannelType

getChannelType

public IChannelType getChannelType(int id)
Description copied from interface: IChannelTypeDao
Get a IChannelType for the specified id.

Specified by:
getChannelType in interface IChannelTypeDao
Parameters:
id - The id to get the type for.
Returns:
The channel type for the id, null if no type exists for the id.

getChannelType

public IChannelType getChannelType(String name)
Description copied from interface: IChannelTypeDao
Get a IChannelType for the specified name

Specified by:
getChannelType in interface IChannelTypeDao
Parameters:
name - The name to get the type for.
Returns:
The channel type for the name, null if no type exists for the fname.

getChannelTypes

public List<IChannelType> getChannelTypes()
Specified by:
getChannelTypes in interface IChannelTypeDao
Returns:
A List of all persisted IChannelTypes

updateChannelType

@Transactional
public IChannelType updateChannelType(IChannelType type)
Description copied from interface: IChannelTypeDao
Persists changes to a IChannelType.

Specified by:
updateChannelType in interface IChannelTypeDao
Parameters:
type - The channel type to store the changes for


Copyright © 2010 Jasig. All Rights Reserved.