2. 엔티티 매핑(entity mapping) 2 3 롬복(lombok)소개-2

public class Test { 
@Delegate(types=Set.class) //Set인터페이스의 메소드가 Test 클래스에 생긴다. 
//그리고 Test에서 Set의 메소드를 호출하도록 만들어준다. 
private final Set<String> emps = new HashSet<String>(); 


다음 코드와 비슷한 모양이다. 
public class Test { 
private final Set<String> emps = 
new HashSet<String>(); 
public boolean add(final String item) { 
return this.emps.add(item); 


public boolean remove(final String item) { 
return this.emps.remove(item); 

...... 


@CommonsLog : Creates private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LogExample.class); 
@Log : Creates static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LogExample.class.getName()); 
@Log4j : Creates private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LogExample.class); 
@Slf4j : Creates private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LogExample.class);  

Comments