?? employeeavailability.java
字號:
package com.power.pipeengine.DispatchReportMap;
import java.util.*;
import java.io.*;
import java.text.*;
import java.net.*;
import com.power.util.Message.*;
import com.power.pipeengine.Entity.*;
import com.power.pipe.*;
import com.power.util.Message.*;
import com.power.pipeengine.*;
import com.power.pipeengine.InputData.*;
public class EmployeeAvailability
extends InputReader {
static ResourceBundle res = ResourceBundle.getBundle(
"com.power.pipeengine.Res",
EngineConfig.getInstance().getLocale());
private String _fileName = "employeeavailability";
private static final EmployeeAvailability INSTANCE =
new EmployeeAvailability();
// Private constructor supresses
// default public constructor
private EmployeeAvailability() {
}
public static EmployeeAvailability getInstance() {
return INSTANCE;
}
protected String getFileName() {
return _fileName;
}
public void readData() throws Exception {
BufferedReader d = super.getReader();
if (null == d) {
return;
}
String token = GlobalConfig.getInstance().getSeparator();
String aLine = d.readLine();
int numOfBuckets = DataModel.getInstance().getCalendar().
getTotalNumOfBuckets();
while (aLine != null) {
if (aLine.length() <= 1) {
aLine = d.readLine();
continue;
}
StringTokenizer st = new StringTokenizer(aLine, token);
if( st.countTokens() < numOfBuckets + 2 ) {
MessageArea.getInstance().addMessage( "File " + getFileName() + " reading error: " +
"Insufficient number of columns: " +
st.countTokens() + " found; " +
(numOfBuckets+2) + " required\n" );
}
String serialID = st.nextToken();
Integer employeeID = new Integer(st.nextToken());
for (int i = 0; i < numOfBuckets; i++) {
int avail = new Integer(st.nextToken()).intValue();
if (avail == 0) {
ProcessCapabilityTable.getInstance().markUnavailable(employeeID,
i + 1);
}
}
aLine = d.readLine();
}
d.close();
super.closeURLConnection();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -