本文整理汇总了Java中ch.rgw.tools.TimeTool.setTime方法的典型用法代码示例。如果您正苦于以下问题:Java TimeTool.setTime方法的具体用法?Java TimeTool.setTime怎么用?Java TimeTool.setTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ch.rgw.tools.TimeTool
的用法示例。
在下文中一共展示了TimeTool.setTime方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initDocumentManager
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
* Initialisiert document manager (omnivore) falls vorhanden
*/
private void initDocumentManager(){
TimeTool today = new TimeTool();
today.setTime(new Date());
Object os = Extensions.findBestService(GlobalServiceDescriptors.DOCUMENT_MANAGEMENT);
if (os != null) {
this.docManager = (IDocumentManager) os;
}
}
示例2: getKonsultationen
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
* @return Sortierte Liste aller Konsultation dieses Patienten
*/
public static ArrayList<Konsultation> getKonsultationen(Patient pat, final boolean reversed){
// Konsultationen sammeln
ArrayList<Konsultation> konsliste = new ArrayList<Konsultation>();
for (Fall f : pat.getFaelle()) {
for (Konsultation k : f.getBehandlungen(true)) {
konsliste.add(k);
}
}
// Konsultationen sortieren
Comparator<Konsultation> comp = new Comparator<Konsultation>() {
public int compare(Konsultation k0, Konsultation k1){
KonsData kd0 = KonsData.load(k0);
TimeTool tt0 = new TimeTool(k0.getDatum());
tt0.setTime(new TimeTool(kd0.getKonsBeginn()));
KonsData kd1 = KonsData.load(k1);
TimeTool tt1 = new TimeTool(k1.getDatum());
tt1.setTime(new TimeTool(kd1.getKonsBeginn()));
if (reversed) {
return tt0.compareTo(tt1);
} else {
return tt1.compareTo(tt0);
}
}
};
Collections.sort(konsliste, comp);
return konsliste;
}
示例3: addLaborItem
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
* Fügt Laborwert zu Patientenlabor hinzu
*
* @param data
*/
public void addLaborItem(final TextData data){
LabItem labItem = getLabItem(data.getName(), LabItemTyp.TEXT);
if (labItem == null) {
String group = data.getGroup();
if (group == null || group.length() == 0) {
group = LABOR_NAME;
}
String sequence = data.getSequence();
if (sequence == null || sequence.length() == 0) {
sequence = "50";
}
labItem =
new LabItem(data.getName(), data.getName(), myLab, null, null,
"", LabItemTyp.TEXT, group, sequence); //$NON-NLS-1$ //$NON-NLS-2$
}
TimeTool dateTime = new TimeTool();
dateTime.setTime(data.getDate());
LabResult lr = getLabResult(labItem, data.getName(), dateTime);
if (lr != null) {
// Wenn Text noch nicht an diesem Tag für diesen Patient vorhanden, dann wird er zum
// bestehenden Text hinzugefügt
if (lr.getComment().indexOf(data.getText()) < 0) {
lr.set(LabResult.COMMENT, lr.getComment() + "\n-----------\n\n" + data.getText());
}
} else {
lr = new LabResult(patient, dateTime, labItem, "Text", data.getText()); //$NON-NLS-1$
}
lr.set("Quelle", LABOR_NAME); //$NON-NLS-1$
}
示例4: setDate
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
public void setDate(Date date){
TimeTool tt = new TimeTool();
tt.setTime(date);
set(FLD_DATE, tt.toString(TimeTool.DATE_COMPACT));
clearCache();
}
示例5: getColumnText
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
@Override
public String getColumnText(Object element, int columnIndex){
if (element instanceof Termin) {
Termin termin = (Termin) element;
StringBuilder sbLabel = new StringBuilder();
TimeSpan ts = termin.getTimeSpan();
// day
TimeTool tt = new TimeTool();
tt.setDate(termin.getDay());
sbLabel.append(tt.toString(TimeTool.DATE_GER));
sbLabel.append(", ");
// start time
tt.setTime(ts.from);
sbLabel.append(tt.toString(TimeTool.TIME_SMALL));
sbLabel.append(" - ");
// end time
tt.setTime(ts.until);
sbLabel.append(tt.toString(TimeTool.TIME_SMALL));
// type
sbLabel.append(" (");
sbLabel.append(termin.getType());
sbLabel.append(", ");
// status
sbLabel.append(termin.getStatus());
sbLabel.append("), ");
// bereich
sbLabel.append(termin.getBereich());
// grund if set
if (termin.getGrund() != null && !termin.getGrund().isEmpty()) {
sbLabel.append(" (");
sbLabel.append(termin.getGrund());
sbLabel.append(")");
}
return sbLabel.toString();
}
return element.toString();
}
示例6: setDate
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
public void setDate(Date d){
TimeTool tt = new TimeTool();
tt.setTime(d);
set(FLD_DATE, tt.toString(TimeTool.DATE_COMPACT));
}
示例7: setCreationDate
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
public void setCreationDate(Date d){
TimeTool tt = new TimeTool();
tt.setTime(d);
set(FLD_CREATION_DATE, tt.toString(TimeTool.DATE_COMPACT));
}
示例8: addDocument
import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
* Fügt Dokument zu Patientenlabor hinzu
*
* @param data
*/
public void addDocument(EncapsulatedData data) throws IOException{
if (this.docManager == null) {
throw new IOException(MessageFormat.format(
Messages.PatientLabor_errorKeineDokumentablage, data.getName(),
this.patient.getLabel()));
}
// Kategorie überprüfen/ erstellen
String category = MedicsPreferencePage.getDokumentKategorie();
checkCreateCategory(category);
String downloadDir = MedicsPreferencePage.getDownloadDir();
// Tmp Verzeichnis überprüfen
File tmpDir = new File(downloadDir + File.separator + "tmp"); //$NON-NLS-1$
if (!tmpDir.exists()) {
if (!tmpDir.mkdirs()) {
throw new IOException(MessageFormat.format(
Messages.PatientLabor_errorCreatingTmpDir, tmpDir.getName()));
}
}
String filename = data.getName();
File tmpPdfFile =
new File(downloadDir + File.separator + "tmp" + File.separator + filename); //$NON-NLS-1$
tmpPdfFile.deleteOnExit();
FileTool.writeFile(tmpPdfFile, data.getData());
TimeTool dateTime = new TimeTool();
dateTime.setTime(data.getDate());
String dateTimeStr = dateTime.toString(TimeTool.DATE_GER);
try {
// Zu Dokumentablage hinzufügen
addDocument(filename, category, dateTimeStr, tmpPdfFile);
// Labor Item erstellen
String kuerzel = "doc"; //$NON-NLS-1$
LabItem labItem = getLabItem(kuerzel, LabItemTyp.DOCUMENT);
if (labItem == null) {
String group = data.getGroup();
if (group == null || group.length() == 0) {
group = LABOR_NAME;
}
String sequence = data.getSequence();
if (sequence == null || sequence.length() == 0) {
sequence = "50";
}
labItem =
new LabItem(kuerzel, Messages.PatientLabor_nameDokumentLaborParameter, myLab,
"", "", //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
FileTool.getExtension(filename), LabItemTyp.DOCUMENT, group, sequence); //$NON-NLS-1$ //$NON-NLS-2$
}
LabResult lr = new LabResult(patient, dateTime, labItem, filename, data.getComment()); //$NON-NLS-1$
lr.set("Quelle", LABOR_NAME); //$NON-NLS-1$
} catch (ElexisException e) {
throw new IOException(MessageFormat.format(Messages.PatientLabor_errorAddingDocument,
tmpPdfFile.getName()), e);
}
}