se.unlogic.standardutils.dao
Class DefaultManyToOneRelation<LocalType,RemoteType,RemoteKeyType>

java.lang.Object
  extended by se.unlogic.standardutils.dao.DefaultManyToOneRelation<LocalType,RemoteType,RemoteKeyType>
All Implemented Interfaces:
Column<LocalType,RemoteType>, ManyToOneRelation<LocalType,RemoteType,RemoteKeyType>

public class DefaultManyToOneRelation<LocalType,RemoteType,RemoteKeyType>
extends Object
implements ManyToOneRelation<LocalType,RemoteType,RemoteKeyType>


Constructor Summary
DefaultManyToOneRelation(Class<LocalType> beanClass, Class<RemoteType> remoteClass, Class<RemoteKeyType> remoteKeyClass, Field field, Field remoteKeyField, DAOManaged daoManaged, AnnotatedDAOFactory daoFactory)
           
 
Method Summary
 void add(LocalType bean, Connection connection, RelationQuery relationQuery)
           
 Field getBeanField()
           
 RemoteKeyType getBeanValue(LocalType bean)
           
 String getColumnName()
           
 Field getField()
           
static
<LT,RT,RKT>
DefaultManyToOneRelation<LT,RT,RKT>
getGenericInstance(Class<LT> beanClass, Class<RT> remoteClass, Class<RKT> remoteKeyClass, Field field, Field remoteField, DAOManaged daoManaged, AnnotatedDAOFactory daoFactory)
           
 Class<RemoteType> getParamType()
           
 RemoteKeyType getParamValue(Object bean)
           
 Method getQueryMethod()
           
 QueryParameterPopulator<RemoteKeyType> getQueryParameterPopulator()
           
 void getRemoteValue(LocalType bean, ResultSet resultSet, Connection connection, RelationQuery relationQuery)
           
 boolean isAutoGenerated()
           
 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

DefaultManyToOneRelation

public DefaultManyToOneRelation(Class<LocalType> beanClass,
                                Class<RemoteType> remoteClass,
                                Class<RemoteKeyType> remoteKeyClass,
                                Field field,
                                Field remoteKeyField,
                                DAOManaged daoManaged,
                                AnnotatedDAOFactory daoFactory)
Method Detail

getColumnName

public String getColumnName()
Specified by:
getColumnName in interface Column<LocalType,RemoteType>

getQueryParameterPopulator

public QueryParameterPopulator<RemoteKeyType> getQueryParameterPopulator()
Specified by:
getQueryParameterPopulator in interface Column<LocalType,RemoteType>

getQueryMethod

public Method getQueryMethod()
Specified by:
getQueryMethod in interface Column<LocalType,RemoteType>

getBeanValue

public RemoteKeyType getBeanValue(LocalType bean)
Specified by:
getBeanValue in interface Column<LocalType,RemoteType>
Specified by:
getBeanValue in interface ManyToOneRelation<LocalType,RemoteType,RemoteKeyType>

getParamValue

public RemoteKeyType getParamValue(Object bean)
Specified by:
getParamValue in interface Column<LocalType,RemoteType>
Specified by:
getParamValue in interface ManyToOneRelation<LocalType,RemoteType,RemoteKeyType>

getRemoteValue

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

add

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

update

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

getField

public Field getField()
Specified by:
getField in interface ManyToOneRelation<LocalType,RemoteType,RemoteKeyType>

getBeanField

public Field getBeanField()
Specified by:
getBeanField in interface Column<LocalType,RemoteType>

getParamType

public Class<RemoteType> getParamType()
Specified by:
getParamType in interface Column<LocalType,RemoteType>

isAutoGenerated

public boolean isAutoGenerated()
Specified by:
isAutoGenerated in interface Column<LocalType,RemoteType>

getGenericInstance

public static <LT,RT,RKT> DefaultManyToOneRelation<LT,RT,RKT> getGenericInstance(Class<LT> beanClass,
                                                                                 Class<RT> remoteClass,
                                                                                 Class<RKT> remoteKeyClass,
                                                                                 Field field,
                                                                                 Field remoteField,
                                                                                 DAOManaged daoManaged,
                                                                                 AnnotatedDAOFactory daoFactory)


Copyright © 2011. All Rights Reserved.