This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* select * | |
* from single s | |
* where s.cd in (select g.cd from group g where g.grp_cd = 'GRP_CD')) | |
* / | |
public List<Single> getList(String grpCd) { | |
QSingle s = QSingle.single; | |
QGroup g = QGroup.group; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<Member> getMemberList() { | |
QMember m = QMember.member; | |
QCommon c = QCommon.common; | |
StringSubQuery companyName = subquery().from(c).where( | |
c.cd.eq(m.companyCd)).unique(c.cdNm)); | |
List<Tuple> tList = select().from(m).where( | |
m.companyCd.eq(companyCd) | |
).list(Projections.tuple(m, companyName)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fetch | |
DynamicForm form = new DynamicForm(); | |
form.fetchData(Record, new DSCallback() { | |
@Override | |
public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) { | |
// fetch한 데이터를 저장 | |
form.rememberValues(); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 현재일자의 달에해당하는 마지막일자 | |
Calendar.getInstance().getActualMaximum(Calendar.DAY_OF_MONTH); | |
// 설정일자에 해당하는 달의 마지막일자 | |
Calendar cal = Calendar.getInstance(); | |
cal.setTime(new Date); // 설정일자 | |
int lastDate = cal.getActualMaximum(Calendar.DAY_OF_MONTH); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Screen() { | |
addDrawHandler(new DrawHandler(){ | |
@Override | |
public void onDraw(DrawEvent event) { | |
// 화면이 모두 생선된후 처리 | |
} | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListGrid.addDataArrivedHandler(new DataArrivedHandler() { | |
@Override | |
public void onDataArrived(DataArrivedEvent event) { | |
// 데이터 조회 완료, 다음 처리 | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var txt = 'abcd1234'; | |
var substringTxt = txt.substring(0, 3); | |
console.log(substringTxt); | |
}); | |
// result - abc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DynamicForm에서 발생한 에러저장공간 | |
Map errors = new HashMap(); | |
// 테스트를 위한 나이 | |
// 나이가 10보다 작으면 오류처리 | |
int age = 10; | |
// 사용자로부터 입력받는 아이템 | |
TextItem itemAge = new TextItem("age", "Age"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- SQL | |
-- select * from member | |
-- where to_char(dt, 'yyyyMMdd') between startDt and endDt | |
QMember member = QMember.member; | |
List<Member> list = | |
select().from(member).where( | |
member.dt.between(startDt, endDt)).list(member); | |
List<Member> list = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- select nvl(num, 0) from table | |
QMember member = QMember.member; | |
Integer num = | |
select().from(member).uniqueResult( | |
member.num.max().coalesce(0)); |