엔티티/테이블 공통 필드/컬럼 추가 -> REG_DT, RGTR, MDFCN_DT, MDFR

master
mjkhan21 2 years ago
parent f8a5df49dc
commit e19abaee6d

@ -0,0 +1,139 @@
package cokr.xit.foundation;
/** (Entity) .<br />
* .
* <ul><li> {@link #getCreatedBy() } / {@link #getCreatedAt() }</li>
* <li> {@link #getModifiedBy() } / {@link #getLastModified() }</li>
* <li>() {@link #getRemovedBy() } / {@link #getRemovedAt() }</li>
* <li>{@link #getUseYN() }</li>
* </ul>
* .
* <ul><li> / </li>
* <li> / </li>
* <li></li>
* </ul>
* @author mjkhan
*/
public abstract class AbstractEntity {
private String createdBy;
private String createdAt;
private String modifiedBy;
private String lastModified;
private String removedBy;
private String removedAt;
private String useYN;
/** .
* @return
*/
public String getCreatedBy() {
return createdBy;
}
/** .
* @param userID
*/
public void setCreatedBy(String userID) {
this.createdBy = userID;
}
/** .
* @return (yyyyMMddhhmmss)
*/
public String getCreatedAt() {
return createdAt;
}
/** .
* @param createAt (yyyyMMddhhmmss)
*/
public void setCreatedAt(String createAt) {
this.createdAt = createAt;
}
/** .
* @return
*/
public String getModifiedBy() {
return modifiedBy;
}
/** .
* @param userID
*/
public void setModifiedBy(String userID) {
this.modifiedBy = userID;
}
/** .
* @return (yyyyMMddhhmmss)
*/
public String getLastModified() {
return lastModified;
}
/** .
* @param lastModified (yyyyMMddhhmmss)
*/
public void setLastModified(String lastModified) {
this.lastModified = lastModified;
}
/**() .
* @return ()
*/
public String getRemovedBy() {
return removedBy;
}
/**() .
* @param userID ()
*/
public void setRemovedBy(String userID) {
this.removedBy = userID;
}
/**() .
* @return ()(yyyyMMddhhmmss)
*/
public String getRemovedAt() {
return removedAt;
}
/**() .
* @param removedAt ()(yyyyMMddhhmmss)
*/
public void setRemovedAt(String removedAt) {
this.removedAt = removedAt;
}
/** .
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean inUse() {
return "Y".equals(getUseYN());
}
/** .
* @return
* <ul><li> Y</li>
* <li> N</li>
* </ul>
*/
public String getUseYN() {
return useYN;
}
/** .
* @param useYN
* <ul><li> Y</li>
* <li> N</li>
* </ul>
*/
public void setUseYN(String useYN) {
this.useYN = useYN;
}
}

@ -4,7 +4,7 @@ import java.io.Serializable;
/** . /** .
*/ */
public class User implements Serializable { public class User extends AbstractEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String UNKNOWN = "anonymous"; private static final String UNKNOWN = "anonymous";
public static final User unknown = new User().seal(); public static final User unknown = new User().seal();

@ -132,6 +132,11 @@ public abstract class AbstractDao extends EgovAbstractMapper {
return ApplicationException.get(t); return ApplicationException.get(t);
} }
/** row camel case .
* @param <T>
* @param list
* @return
*/
protected static <T extends List<Map<String, Object>>> T underscoredToCamelCase(T list) { protected static <T extends List<Map<String, Object>>> T underscoredToCamelCase(T list) {
if (list.isEmpty()) if (list.isEmpty())
return list; return list;

@ -8,12 +8,12 @@ import cokr.xit.foundation.data.DataObject;
* ,<br /> * ,<br />
* ( || ) + 'Mapper' . * ( || ) + 'Mapper' .
* {@code @Mapper} . . * {@code @Mapper} . .
* <pre><code> package cokr.xit.example.business.dao; * <pre> package cokr.xit.example.business.dao;
* import org.egovframe.rte.psl.dataaccess.mapper.Mapper; * import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
* {@code @Mapper("tableBMapper")} * {@code @Mapper("tableBMapper")}
* public interface TableBMapper extends AbstractMapper { * public interface TableBMapper extends AbstractMapper {
* ... * ...
* }</code></pre> * }</pre>
* <p><b> </b><br /> * <p><b> </b><br />
* SQL . * SQL .
* <ul><li> , Mapper -mapper .<br /> * <ul><li> , Mapper -mapper .<br />

@ -20,12 +20,12 @@ import cokr.xit.foundation.UserInfo;
* <p> , ' ' + 'ServiceBean' .<br /> * <p> , ' ' + 'ServiceBean' .<br />
* @Service , . * @Service , .
* . * .
* <pre><code> package cokr.xit.example.business.service.bean; * <pre> package cokr.xit.example.business.service.bean;
* ... * ...
* {@code @Service("businessService")} * {@code @Service("businessService")}
* public class BusinessServiceBean extends AbstractServiceBean implements BusinessService { * public class BusinessServiceBean extends AbstractServiceBean implements BusinessService {
* ... * ...
* }</code></pre> * }</pre>
* @Resource . * @Resource .
* <pre><code> @Resource(name = "businessService") * <pre><code> @Resource(name = "businessService")
* BusinessService businessService;</code></pre> * BusinessService businessService;</code></pre>

Loading…
Cancel
Save