org.unitedfront2.domain
Class SpringBeanDomainFactory

java.lang.Object
  extended by org.unitedfront2.domain.SpringBeanDomainFactory
All Implemented Interfaces:
ApplicationContextAware, DomainFactory

public class SpringBeanDomainFactory
extends Object
implements DomainFactory, ApplicationContextAware

DomainFactory の Spring Framework DI コンテナ実装です。

Author:
kurokkie

Field Summary
protected  Log logger
          ログ
 
Constructor Summary
SpringBeanDomainFactory()
           
 
Method Summary
<T> T
prototype(Class<?> domainClass, Class<T> requiredType)
          ドメインオブジェクトが動作するために必須となるいくつかの非永続プロパティに値が設定された後の、新しい ドメインオブジェクトを返します。非永続プロパティとは、transient で修飾されたプロ パティです。
<D extends Domain>
D
prototype(Class<D> domainClass)
          ドメインオブジェクトが動作するために必須となるいくつかの非永続プロパティに値が設定された後の、新しい ドメインオブジェクトを返します。非永続プロパティとは、transient で修飾されたプロ パティです。
<D> D
prototype(D orig)
          ドメインオブジェクトが動作するために必須となるいくつかの非永続プロパティに値が設定された後の、新しい ドメインオブジェクトを返します。返されるドメインオブジェクトには、引数で渡したドメインオブジェクトのプロパ ティが設定されます。引き渡したコピー元のドメインオブジェクトの状態は変化しません。
<T> T
prototype(Object domainObject, Class<T> clazz)
          ドメインオブジェクトが動作するために必須となるいくつかの非永続プロパティに値が設定された後の、新しい ドメインオブジェクトを返します。返されるドメインオブジェクトには、引数で渡したドメインオブジェクトのプロパ ティが設定されます。引き渡したコピー元のドメインオブジェクトの状態は変化しません。
 void setApplicationContext(ApplicationContext applicationContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Log logger
ログ

Constructor Detail

SpringBeanDomainFactory

public SpringBeanDomainFactory()
Method Detail

prototype

public <D extends Domain> D prototype(Class<D> domainClass)
Description copied from interface: DomainFactory
ドメインオブジェクトが動作するために必須となるいくつかの非永続プロパティに値が設定された後の、新しい ドメインオブジェクトを返します。非永続プロパティとは、transient で修飾されたプロ パティです。

Specified by:
prototype in interface DomainFactory
Parameters:
domainClass - ドメインクラス
Returns:
ドメインオブジェクトのプロトタイプ

prototype

public <T> T prototype(Class<?> domainClass,
                       Class<T> requiredType)
            throws IllegalArgumentException
Description copied from interface: DomainFactory
ドメインオブジェクトが動作するために必須となるいくつかの非永続プロパティに値が設定された後の、新しい ドメインオブジェクトを返します。非永続プロパティとは、transient で修飾されたプロ パティです。

Specified by:
prototype in interface DomainFactory
Type Parameters:
T - 期待する型
Parameters:
domainClass - ドメインクラス
requiredType - 期待する型
Returns:
ドメインオブジェクトのプロトタイプ
Throws:
IllegalArgumentException

prototype

public <D> D prototype(D orig)
Description copied from interface: DomainFactory
ドメインオブジェクトが動作するために必須となるいくつかの非永続プロパティに値が設定された後の、新しい ドメインオブジェクトを返します。返されるドメインオブジェクトには、引数で渡したドメインオブジェクトのプロパ ティが設定されます。引き渡したコピー元のドメインオブジェクトの状態は変化しません。

Specified by:
prototype in interface DomainFactory
Type Parameters:
D - ドメインクラス
Parameters:
orig - コピー元のドメインオブジェクト
Returns:
コピー元のドメインオブジェクトが持つプロパティの値が設定された、ドメインオブジェクトのプロトタ イプ

prototype

public <T> T prototype(Object domainObject,
                       Class<T> clazz)
            throws IllegalArgumentException
Description copied from interface: DomainFactory
ドメインオブジェクトが動作するために必須となるいくつかの非永続プロパティに値が設定された後の、新しい ドメインオブジェクトを返します。返されるドメインオブジェクトには、引数で渡したドメインオブジェクトのプロパ ティが設定されます。引き渡したコピー元のドメインオブジェクトの状態は変化しません。

Specified by:
prototype in interface DomainFactory
Type Parameters:
T - ドメインクラス
Parameters:
domainObject - コピー元のドメインオブジェクト
clazz - 期待する型
Returns:
コピー元のドメインオブジェクトが持つプロパティの値が設定された、ドメインオブジェクトのプロトタ イプ
Throws:
IllegalArgumentException

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
Specified by:
setApplicationContext in interface ApplicationContextAware
Throws:
BeansException


Copyright © 2007-2009 www.unitedfront2.org. All Rights Reserved.