se.unlogic.standardutils.dao
Class DefaultManyToManyRelation<LocalType,RemoteType>

java.lang.Object
  extended by se.unlogic.standardutils.dao.DefaultManyToManyRelation<LocalType,RemoteType>
All Implemented Interfaces:
ManyToManyRelation<LocalType,RemoteType>

public class DefaultManyToManyRelation<LocalType,RemoteType>
extends Object
implements ManyToManyRelation<LocalType,RemoteType>


Constructor Summary
DefaultManyToManyRelation(Class<LocalType> beanClass, Class<RemoteType> remoteClass, Field field, AnnotatedDAOFactory daoFactory, DAOManaged daoManaged)
           
 
Method Summary
 void add(LocalType bean, Connection connection, RelationQuery relationQuery)
           
static
<LT,RT> ManyToManyRelation<LT,RT>
getGenericInstance(Class<LT> beanClass, Class<RT> remoteClass, Field field, AnnotatedDAOFactory daoFactory, DAOManaged daoManaged)
           
static Field getKeyField(ManyToMany manyToManyAnnotation, Class<?> clazz, Field annotatedField)
           
static ArrayList<Field> getKeyFields(Class<?> clazz)
           
 void getRemoteValue(LocalType bean, Connection connection, RelationQuery relationQuery)
           
 void update(LocalType bean, Connection connection, RelationQuery relationQuery)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultManyToManyRelation

public DefaultManyToManyRelation(Class<LocalType> beanClass,
                                 Class<RemoteType> remoteClass,
                                 Field field,
                                 AnnotatedDAOFactory daoFactory,
                                 DAOManaged daoManaged)
Method Detail

getRemoteValue

public void getRemoteValue(LocalType bean,
                           Connection connection,
                           RelationQuery relationQuery)
                    throws SQLException
Specified by:
getRemoteValue in interface ManyToManyRelation<LocalType,RemoteType>
Throws:
SQLException

add

public void add(LocalType bean,
                Connection connection,
                RelationQuery relationQuery)
         throws SQLException
Specified by:
add in interface ManyToManyRelation<LocalType,RemoteType>
Throws:
SQLException

update

public void update(LocalType bean,
                   Connection connection,
                   RelationQuery relationQuery)
            throws SQLException
Specified by:
update in interface ManyToManyRelation<LocalType,RemoteType>
Throws:
SQLException

getKeyField

public static Field getKeyField(ManyToMany manyToManyAnnotation,
                                Class<?> clazz,
                                Field annotatedField)

getKeyFields

public static ArrayList<Field> getKeyFields(Class<?> clazz)

getGenericInstance

public static <LT,RT> ManyToManyRelation<LT,RT> getGenericInstance(Class<LT> beanClass,
                                                                   Class<RT> remoteClass,
                                                                   Field field,
                                                                   AnnotatedDAOFactory daoFactory,
                                                                   DAOManaged daoManaged)


Copyright © 2011. All Rights Reserved.