本文整理汇总了Java中ch.elexis.data.Mandant.load方法的典型用法代码示例。如果您正苦于以下问题:Java Mandant.load方法的具体用法?Java Mandant.load怎么用?Java Mandant.load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ch.elexis.data.Mandant
的用法示例。
在下文中一共展示了Mandant.load方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import ch.elexis.data.Mandant; //导入方法依赖的package包/类
@Override
public void update(ViewerCell cell){
User user = (User) cell.getElement();
cell.setText(user.getLabel());
Anwender ac = user.getAssignedContact();
if (ac != null && ac.isExecutiveDoctor()) {
Mandant m = Mandant.load(ac.getId());
Color mc = UiMandant.getColorForMandator(m);
cell.setImage(MandantSelectionContributionItem.getBoxSWTColorImage(mc));
} else {
cell.setImage(Images.IMG_EMPTY_TRANSPARENT.getImage());
}
if (user.isAdministrator()) {
cell.setForeground(UiDesk.getColor(UiDesk.COL_RED));
cell.setImage(Images.IMG_AUSRUFEZ.getImage());
}
}
示例2: loadAssignedMandant
import ch.elexis.data.Mandant; //导入方法依赖的package包/类
private Mandant loadAssignedMandant(boolean retry){
List<LabOrder> orders =
LabOrder.getLabOrders(labResult.getPatient(), null, null, labResult, null, null, null);
if (orders != null && !orders.isEmpty()) {
String mandantId = orders.get(0).get(LabOrder.FLD_MANDANT);
if (mandantId != null && !mandantId.isEmpty()) {
return Mandant.load(mandantId);
}
}
// sometimes the mandant is persisted delayed from another thread - we have to try again to fetch the mandant id
if (retry)
{
try {
Thread.sleep(1500);
return loadAssignedMandant(false);
}
catch (InterruptedException e) {
/* ignore */
}
}
return null;
}
示例3: updateViewer
import ch.elexis.data.Mandant; //导入方法依赖的package包/类
private void updateViewer(){
if (mandant != null) {
Query<Mandant> qbe = new Query<Mandant>(Mandant.class);
List<Mandant> input = qbe.execute();
input.add(0, noMandant);
responsibleViewer.setInput(input);
String responsibleId =
(String) mandant.getInfoElement(TarmedRequirements.RESPONSIBLE_INFO_KEY);
if (responsibleId != null && !responsibleId.isEmpty()) {
Mandant responsible = Mandant.load(responsibleId);
if (responsible != null && responsible.exists()) {
responsibleViewer.setSelection(new StructuredSelection(responsible));
}
}
} else {
responsibleViewer.setInput(Collections.EMPTY_LIST);
}
}
示例4: getResponsibleEAN
import ch.elexis.data.Mandant; //导入方法依赖的package包/类
/**
* Determine the EAN of the responsible Kontakt for a Konsultation. The search for thee right
* contact is in the following order.<br\>
* 1. configured via ResponsibleComposite on RechnungsPref preference page for the Mandant of
* the consultation<br\>
* 2. Rechnungssteller of the Mandant of the consultation if not an organization<br\>
* 3. the Mandant of the consultation<\br>
*
* @param kons
* @return
*/
public static String getResponsibleEAN(Konsultation kons){
Kontakt responsibleKontakt = null;
String responsibleId =
(String) kons.getMandant().getInfoElement(TarmedRequirements.RESPONSIBLE_INFO_KEY);
if (responsibleId != null && !responsibleId.isEmpty()) {
responsibleKontakt = Mandant.load(responsibleId);
} else {
Rechnungssteller rechnungssteller = kons.getMandant().getRechnungssteller();
String anrede = rechnungssteller.getInfoString("Anrede");
// only way to determine if rechnungssteller is a organization is testing empty anrede
if (anrede != null && !anrede.isEmpty()) {
responsibleKontakt = rechnungssteller;
} else {
responsibleKontakt = kons.getMandant();
}
}
return TarmedRequirements.getEAN(responsibleKontakt);
}
示例5: getMandant
import ch.elexis.data.Mandant; //导入方法依赖的package包/类
public Mandant getMandant(){
Mandant ret = (mandantId == "" ? null : Mandant.load(mandantId));
if (ret != null && ret.exists()) {
return ret;
}
return null;
}
示例6: updateUi
import ch.elexis.data.Mandant; //导入方法依赖的package包/类
private void updateUi(){
MailAccount mailAccount = getAccount();
mandantInput.clear();
if (mailAccount != null) {
if (mailAccount.getType() == TYPE.IMAP) {
((GridData) fromAddressLabel.getLayoutData()).exclude = true;
fromAddressLabel.setVisible(false);
((GridData) fromAddress.getLayoutData()).exclude = true;
fromAddress.setVisible(false);
} else if (mailAccount.getType() == TYPE.SMTP) {
((GridData) fromAddressLabel.getLayoutData()).exclude = false;
fromAddressLabel.setVisible(true);
((GridData) fromAddress.getLayoutData()).exclude = false;
fromAddress.setVisible(true);
} else {
((GridData) fromAddressLabel.getLayoutData()).exclude = true;
fromAddressLabel.setVisible(false);
((GridData) fromAddress.getLayoutData()).exclude = true;
fromAddress.setVisible(false);
}
String mandants = mailAccount.getMandants();
if (mandants != null) {
String[] ids = mandants.split("\\|\\|");
for (String string : ids) {
Mandant mandant = Mandant.load(string);
if (mandant != null && mandant.exists()) {
mandantInput.add(mandant);
}
}
}
}
layout();
redraw();
}
示例7: getMandant
import ch.elexis.data.Mandant; //导入方法依赖的package包/类
public Mandant getMandant(){
Mandant ret = Mandant.load(checkNull(get(FLD_MANDANT)));
if (ret.exists()) {
return ret;
}
return null;
}
示例8: handleValueChange
import ch.elexis.data.Mandant; //导入方法依赖的package包/类
@Override
public void handleValueChange(ValueChangeEvent event){
User user = (User) wvUser.getValue();
if (user == null) {
wvAnwender.setValue(null);
return;
}
setErrorMessage(null);
txtPassword.setText("");
txtPassword2.setText("");
lblUsername.setText(user.getUsername());
linkChangePassword.setText(CHANGE_LINK + " (Passwort gesetzt)");
Anwender anw = user.getAssignedContact();
wvAnwender.setValue(anw);
String text = (anw != null) ? anw.getPersonalia() : "Nicht gesetzt";
linkContact.setText(text + " " + CHANGE_LINK);
List<Role> roles = new Query<Role>(Role.class).execute();
checkboxTableViewerRoles.setInput(roles);
Object[] assignedRoles = user.getAssignedRoles().toArray();
checkboxTableViewerRoles.setCheckedElements(assignedRoles);
checkboxTableViewerAssociation.setInput(new Query<Mandant>(Mandant.class).execute());
checkboxTableViewerAssociation.setCheckedElements(new Mandant[] {});
linkRechnungssteller.setText("- " + CHANGE_LINK);
lblRespPhysColor.setBackground(lblRespPhysColorDefColor);
if (anw != null) {
checkboxTableViewerAssociation
.setCheckedElements(anw.getExecutiveDoctorsWorkingFor().toArray());
if (anw.isExecutiveDoctor()) {
Mandant m = Mandant.load(anw.getId());
Color color = UiMandant.getColorForMandator(m);
lblRespPhysColor.setBackground(color);
Rechnungssteller rs = m.getRechnungssteller();
String rst = (rs != null) ? rs.getLabel() : "Nicht gesetzt";
linkRechnungssteller.setText(rst + " " + CHANGE_LINK);
}
}
}