package fence;
|
import java.util.Vector;
|
|
import Method.GetNowTime;
|
import tbDataModel.Infencetag;
|
public class Dell_infencetag {
|
//ËùÓÐÔÚΧÀ¸ÄڵĶÔÏ󼯺Ï
|
Vector<Infencetag> vc_infence=new Vector<Infencetag>();
|
|
public Vector<Infencetag> getVc_infence() {
|
return vc_infence;
|
}
|
|
|
/**ѰÕÒij¸ö±êÇ©
|
* @param tagid*/
|
public Infencetag getinfence(String tagid) {
|
Infencetag a=null;
|
int size=vc_infence.size();
|
for(int i=0;i<size;i++) {
|
Infencetag intag=vc_infence.get(i);
|
String tagid1=intag.getTagid();
|
if(tagid.equals(tagid1)) {
|
a=intag;
|
break;
|
}
|
}
|
return a;
|
}
|
|
|
/**ΧÀ¸ÄÚÌí¼ÓÒ»¸ö¶ÔÏó*/
|
public void add_tag(String tagid,String intime) {
|
if(getinfence(tagid)==null) {
|
Infencetag a=new Infencetag();
|
a.setTagid(tagid);
|
a.setIntime(GetNowTime.now());
|
vc_infence.add(a);
|
}
|
}
|
|
/**ɾ³ýij¸öΧÀ¸ÄڵĶÔÏó*/
|
public void delete_tag(String tagid) {
|
if(getinfence(tagid) !=null) {
|
vc_infence.removeElement(getinfence(tagid));
|
}
|
}
|
|
/**ɾ³ýËùÓÐΧÀ¸ÄڵĶÔÏó*/
|
public void deleteall() {
|
vc_infence.removeAllElements();
|
}
|
|
|
}
|