Home > Back-end >  Java element is added to the children how to child nodes
Java element is added to the children how to child nodes

Time:09-28

Java children child nodes add elements;


 public ListListThe Integer classTotalCount=stageClassDao. FindClassTotalCount (RowGuid); 
The Integer classStudyCount=stageClassDao. FindClassStudyCount (RowGuid);
For (StageClass1Node stageClass: stage) {
//a stage for class
Integer stageClassCount=stageClassDao. FindStageClassCount (stageClass getStageRowGuid ());
StageClass. SetStageClassCount (stageClassCount);
The Integer buyCourseCount=courseAllDao. FindBuyCourseCount (RowGuid);
The Integer classCount=courseAllDao. FindClassCount (RowGuid);
StageClass. SetStudyClassCount (classStudyCount);//the current course has the number of learning lessons
If (stageClass getTIstest ()==null) {
StageClass. SetTIstest (0);
}
If (buyCourseCount==null) {
StageClass. SetBuyCount (0);
} else {
StageClass. SetBuyCount (buyCourseCount);
}
If (classCount==null) {
StageClass. SetClassCount (0);
} else {
StageClass. SetClassCount (classTotalCount);
}
If (stageClass getBuyCount ()==null) {
StageClass. SetBuyCount (0);
}
for (int i=0; iString classRowGuid=stage. The get (I). GetClassRowGuid ();
List ClassLinkStatus=classLinkVoDao. FindClassLinkStatus (classRowGuid);
For (ClassLinkVo ClassLinkVo: classLinkStatus) {
Stage. The get (I). The setList (classLinkStatus);
StageClass. SetList (classLinkStatus);
If (classLinkVo. GetTLinkName (.) the equals (" work ")) {
ClassLinkVo. SetType (3);
} else if (classLinkVo getTLinkName (.) the equals (" preview ")) {
ClassLinkVo. SetType (1);
} else if (classLinkVo getTLinkName (.) the equals (" class ")) {
ClassLinkVo. SetType (2);
}
}
}
}
Return stage;
}


 @ Data 
Public class StageClass1 {

private String id;
Private String StageRowGuid;
Private String classRowGuid;
Private String StageName;
Private String ClassName.
Private String tCourseName;
Private String ClassUpdateDate;
Private String StageUpdateDate;
Private String imgUrl;
/* *
* user name
*/
Private String tUsername;
/* *
* real name
*/
Private String tRealyname;

Private Integer buyCount;
Private Integer classCount;
Private Integer tIstest;
Private Integer studyClassCount;
Private Integer stageClassCount;
Private List List;

}


 & lt; ? The XML version="1.0" encoding="utf-8"?> 









 @ Data 
@ ToString
Public class StageClass1Node extends StageClass1 {

Private List}
  • Related