- addAll(
vec
)
-
인자로 넘어온 Vector객체에 있는 모든 데이터를 추가합니다.
Parameter
vec | Vector | Y | 입력할 데이터가 들어있는 WebSquare Vector |
Sample
var vec = new WebSquare.collection.Vector();
vec.addElement("Seoul");
var vec1 = new WebSquare.collection.Vector();
vec1.addElement("Busan");
vec.addAll( vec1 );
alert( vec.toString() );
결과:
- addElement(
data
)
-
새로운 데이터를 Vector에 추가합니다.
지원하는 데이터는 Vector, Hashtable, XML Document, XMLString(WellFormed한 xml형태의 String), String 등이며 나머지 데이터는 String으로 변환해서 저장합니다.
Parameter
data | Object | Y | 추가하려고 하는 Data |
Sample
var vec = new WebSquare.collection.Vector();
vec.addElement("Seoul");
alert(vec.toString());
결과:
- containsKey(
key
)
-
키가 Hashtable에 존재하는지 테스트합니다.
Parameter
key | Object | Y | 테스트할 키 |
Return
Boolean | 존재하는 경우 true, 존재하지 않는 경우 false |
Sample
var hash = new WebSquare.collection.Hashtable();
hash.put("location" , "Seoul");
var exist = hash.containsKey("location")
exist : true
- elementAt(
i
)
-
지정된 index위치의 데이터를 반환합니다. 값이 존재하지 않으면 null을 반환합니다.
Parameter
i | String | Y | index 번호 |
Return
Object | 해당하는 index 위치의 Data. 존재하지 않으면 Null |
Sample
var vec = new WebSquare.collection.Vector();
vec.addElement("Seoul");
vec.addElement("Busan");
var result = vec.elementAt( 1 );
result : Busan
- elements(
)
-
Hashtable에 저장되어 있는 값의 목록을 Array로 반환합니다.
Return
Array | Hashtable data Array |
Sample
var hash = new WebSquare.collection.Hashtable();
hash.put("location" , "Seoul");
hash.put("date" , "20120101");
var arr = hash.elements();
arr[0]은 20120101 , arr[1]은 Seoul.
- fastRemove(
i
)
-
지정한 위치의 값을 삭제만 합니다.
Parameter
i | String | Y | index 번호 |
Sample
vec.fastRemove( 0 );
- get(
key
)
-
Hashtable에서 key와 연결되어 있는 값을 조회합니다.
Parameter
key | Object | Y | 조회에 사용되는 key |
Return
Object | key가 존재하는 경우 연결된 값, 없는 경우에는 null을 반환 |
Sample
var hash = new WebSquare.collection.Hashtable();
hash.put("location", "Seoul");
alert(hash.get("location"));
결과 : Seoul
- getAction(
)
-
Vector의 action속성을 반환합니다.
인스웨이브 프레임워크 사용시 사용가능합니다.
Sample
var action = vec.getAction();
- getAction(
)
-
Hashtable의 action속성을 반환합니다.
인스웨이브 프레임워크 사용시 사용가능합니다.
Sample
var action = hash.getAction();
- getAttribute(
name
)
-
Vector의 속성을 반환합니다. Vector의 속성값은 XML로 변환시 최상위 노드의 속성값으로 표현됩니다.
Parameter
name | String | Y | 속성 이름 |
Sample
var vec = new WebSquare.collection.Vector();
vec.setAttribute( "task", "com.inswave.system.task.TMSTask" );
alert(vec.getAttribute("task"));
결과 : com.inswave.system.task.TMSTask
- getAttribute(
name
)
-
Hashtable의 속성을 반환합니다.
Hashtable의 속성값은 XML로 변환시 최상위 노드의 속성값으로 표현됩니다.
Parameter
name | String | Y | 속성 이름 |
Sample
var hash = new WebSquare.collection.Hashtable();
hash.setAttribute( "task", "com.inswave.system.task.TMSTask" );
alert(hash.getAttribute("task"));
결과 : com.inswave.system.task.TMSTask
- getTask(
)
-
Vector의 task속성을 반환합니다.
인스웨이브 프레임워크 사용시 사용가능합니다.
Sample
var action = vec.getTask();
- getTask(
)
-
Hashtable의 task속성을 반환합니다.
인스웨이브 프레임워크 사용시 사용가능합니다.
Sample
var task = hash.getTask();
- insertElementAt(
data
,
i
)
-
지정된 위치에 데이터를 추가합니다. index가 0보다 작거나 Vector의 길이보다 큰 경우 아무런 작업을 수행하지 않습니다.
Parameter
data | Object | Y | 지원하는 데이터는 Vector, Hashtable, XML Document, XMLString(WellFormed한 xml형태의 String), String 등이며 나머지 데이터는 String으로 변환해서 저장 |
i | String | Y | index 번호 |
Sample
var vec = new WebSquare.collection.Vector();
vec.addElement("Seoul");
vec.insertElementAt("", 0 );
alert( vec.toString() );
결과 :
- keys(
)
-
Hashtable에 저장되어 있는 key의 목록을 Array로 반환합니다.
Sample
var hash = new WebSquare.collection.Hashtable();
hash.put("location" , "Seoul");
hash.put("date" , "20120101");
var arr = hash.keys();
arr[0] 은 date, arr[1] 은 location.
- put(
key
,
data
)
-
Hashtable에 지정한 key로 값을 저장합니다. 기존에 값은 key로 저장된 값이 있으면 반환합니다.
지원하는 데이터는 Vector, Hashtable, XML Document, XMLString(WellFormed한 xml형태의 String), String 등이며 나머지 데이터는 String으로 변환해서 저장합니다.
Parameter
key | String | Y | 저장에 사용되는 key값 |
data | Object | Y | key값과 match되어 사용될 값 |
Return
Object | key가 존재하는 경우 연결된 값, 없는 경우에는 null을 반환 |
Sample
var hash = new WebSquare.collection.Hashtable();
hash.put("location", "Seoul");
alert(hash.toString());
결과 :
- remove(
i
)
-
Vector의 지정한 위치의 값을 삭제한 후 반환합니다.
Parameter
i | String | Y | index 번호 |
Return
Object | i의 위치에 있던 삭제된 데이터 |
Sample
var vec = new WebSquare.collection.Vector();
vec.addElement("Seoul");
var removedElement = vec.remove( 0 );
removedElement : Seoul
- remove(
key
)
-
Hashtable에 지정한 key로 저장된 값을 삭제합니다. 처리후 삭제한 값을 반환합니다.
Parameter
key | String | Y | 삭제에 사용되는 key |
Return
Object | key와 관련된 값이 저장되어 있으면 값을 반환. 없는 경우 null반환 |
Sample
var hash = new WebSquare.collection.Hashtable();
hash.put("location" , "Seoul");
hash.remove("location");
alert(hash.toString());
결과 :
- set(
i
,
data
)
-
지정한 위치의 데이터를 새로운 데이터로 치환합니다.
Parameter
i | String | Y | 치환할 위치의 index |
data | Object | Y | 치환할 Data. 지원하는 데이터는 Vector, Hashtable, XML Document, XMLString(WellFormed한 xml형태의 String), String 등이며 나머지 데이터는 String으로 변환해서 저장 |
Sample
var vec = new WebSquare.collection.Vector();
vec.addElement("Seoul");
vec.set( 0, "Busan" );
alert(vec.toString());
결과 :
- setAction(
value
)
-
Vector에 action 속성을 설정합니다.
인스웨이브 프레임워크 사용시 사용가능합니다.
Parameter
value | String | Y | Action 이름 |
Sample
vec.setAction("selectList");
- setAction(
value
)
-
Hashtable에 action 속성을 설정합니다.
인스웨이브 프레임워크 사용시 사용가능합니다.
Parameter
value | String | Y | Action 이름 |
Sample
hash.setAction( "selectList" );
- setAttribute(
name
,
value
)
-
Vector의 속성의 설정합니다. Vector의 속성값은 XML로 변환시 최상위 노드의 속성값으로 표현됩니다.
Parameter
name | String | Y | 속성 이름 |
value | Object | Y | 속성 값 |
Sample
var vec = new WebSquare.collection.Vector();
vec.setAttribute( "task", "com.inswave.system.task.TMSTask" );
alert(vec.toString());
결과:
- setAttribute(
name
,
value
)
-
Hashtable의 속성을 설정합니다.
Hashtable의 속성값은 XML로 변환시 최상위 노드의 속성값으로 표현됩니다.
Parameter
name | String | Y | 속성 이름 |
value | Object | Y | 속성 값 |
Sample
var hash = new WebSquare.collection.Hashtable();
hash.setAttribute( "task", "com.inswave.system.task.TMSTask" );
alert(hash.toString());
결과 :
- setDebug(
value
)
-
Vector에 디버깅 관련 속성을 설정합니다.
디버깅 관련 설정은 debug 속성으로 표현되면 설정가능한 값은 true/false입니다.
디버깅 설정이 된 경우 서버쪽에서 debug값을 지원하면 디버그 정보가 추가로 나타납니다.
인스웨이브 프레임워크 사용시 사용가능합니다.
Parameter
value | Boolean | Y | Debug Flag(true/false) |
Sample
vec.setDebug( true );
- setDebug(
value
)
-
Hashtable에 디버깅 관련 속성을 설정합니다.
debug 값이 true일 경우 서버쪽에서 debug값을 지원하면 디버그 정보가 추가로 나타납니다.
인스웨이브 프레임워크 사용시 사용가능합니다.
Parameter
value | Boolean | Y | debug 속성의 값 |
Return
Boolean | value Debug Flag(true/false) |
Sample
hash.setDebug( true );
- setDocument(
doc
)
-
기존 Vector의 데이터를 삭제하고 XML형태의 데이터로 초기화합니다.
Parameter
doc | Document | Y | 입력할 데이터가 있는 XML 형태의 Document |
Sample
var vec = new WebSquare.collection.Vector();
var doc = WebSquare.xml.parse( "" );
vec.setDocument( doc );
alert(vec.toString());
결과:
- setDocument(
doc
)
-
기존 Hashtable의 데이터를 삭제하고 XML형태의 데이터로 초기화합니다.
Parameter
doc | Document | Y | 입력할 데이터가 들어있는 XML Document |
Sample
var hash = new WebSquare.collection.Hashtable();
var doc = WebSquare.xml.parse( "" );
hash.setDocument( doc );
alert(hash.toString());
결과 :
- setTask(
value
)
-
Vector에 task 속성을 설정합니다.
인스웨이브 프레임워크 사용시 사용가능합니다.
Parameter
value | String | Y | Task 이름 |
Sample
vec.setTask("com.inswave.system.task.TMSTask");
- setTask(
value
)
-
Hashtable에 task 속성을 설정합니다.
인스웨이브 프레임워크 사용시 사용가능합니다.
Parameter
value | String | Y | task 이름 |
Sample
hash.setTask( "com.inswave.system.task.TMSTask" );
- size(
)
-
Vector에 포함되어 있는 데이터의 개수를 반환합니다.
Sample
var vec = new WebSquare.collection.Vector();
vec.addElement("Seoul");
var vecSize = vec.size();
vecSize : 1
- toDocument(
)
-
Vector를 XML Document로 변환합니다.
Return
Document | Vector의 XML Document |
Sample
var doc = vec.toDocument();
- toDocument(
)
-
Hashtable을 XML Document로 변환합니다.
Return
Document | Hashtable의 XML Document |
Sample
var doc = hash.toDocument();
- toHashtable(
doc
)
-
XML( String/Document)을 Hashtable Object로 변환합니다.( 값을 reference하지 않습니다. )
Parameter
doc | Object | Y | 변환할 XML String/XML Document |
Return
Object | WebSquare.collection.Hashtable객체 |
Sample
var vector = WebSquare.collection.toHashtable( doc );
- toString(
)
-
Vector을 XML String으로 변환합니다.
Return
String | Vector의 XML String |
Sample
var doc = vec.toString();
- toString(
)
-
Hashtable을 XML String으로 변환합니다.
Return
String | Hashtable의 XML String |
Sample
var hashStr = hash.toString();
- toVector(
doc
)
-
XML( String/Document)을 Vector Object로 변환합니다.( 값을 reference하지 않지않습니다. )
Parameter
doc | Object | Y | 변환할 XML String/XML Document |
Return
Object | WebSquare.collection.Vector 객체 |
Sample
var vector = WebSquare.collection.toVector( doc );
- WebSquare.collection.Hashtable(
)
-
Hashtable 생성.
Sample
var hash = new WebSquare.collection.Hashtable();
- WebSquare.collection.Vector(
)
-
Vector 생성.
Sample
var vec = new WebSquare.collection.Vector();