📄 uiscreen.java
字号:
/*
*
* Copyright (c) 2004 SourceTap - www.sourcetap.com
*
* The contents of this file are subject to the SourceTap Public License
* ("License"); You may not use this file except in compliance with the
* License. You may obtain a copy of the License at http://www.sourcetap.com/license.htm
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
*/
package com.sourcetap.sfa.ui;
import java.util.HashMap;
import java.util.List;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
/**
* DOCUMENT ME!
*
*/
public class UIScreen {
public static final String module = UIScreen.class.getName();
protected String screenId = "";
protected String applicationId = "";
protected String screenName = "";
protected String screenDescription = "";
public UIScreen() {
}
public UIScreen(String screenName, GenericDelegator delegator)
throws GenericEntityException {
initialize(screenName, delegator);
}
// public UIScreen(String screenId_, String applicationId_, String screenName_, String screenDescription) {
// setScreenId(uiScreenGV.getString("screenId")==null ? "" : uiScreenGV.getString("screenId"));
// setApplicationId(uiScreenGV.getString("applicationId")==null ? "" : uiScreenGV.getString("applicationId"));
// setScreenName(uiScreenGV.getString("screenName")==null ? "" : uiScreenGV.getString("screenName"));
// setScreenDescription(uiScreenGV.getString("screenDescription")==null ? "" : uiScreenGV.getString("screenDescription"));
// }
public UIScreen(GenericValue uiScreenGV, GenericDelegator delegator) {
initialize(uiScreenGV, delegator);
}
/**
* DOCUMENT ME!
*
* @param screenId_
*/
public void setScreenId(String screenId_) {
screenId = screenId_;
}
/**
* DOCUMENT ME!
*
* @return
*/
public String getScreenId() {
return screenId;
}
/**
* DOCUMENT ME!
*
* @param applicationId_
*/
public void setApplicationId(String applicationId_) {
applicationId = applicationId_;
}
/**
* DOCUMENT ME!
*
* @return
*/
public String getApplicationId() {
return applicationId;
}
/**
* DOCUMENT ME!
*
* @param screenName_
*/
public void setScreenName(String screenName_) {
screenName = screenName_;
}
/**
* DOCUMENT ME!
*
* @return
*/
public String getScreenName() {
return screenName;
}
/**
* DOCUMENT ME!
*
* @param screenDescription_
*/
public void setScreenDescription(String screenDescription_) {
screenDescription = screenDescription_;
}
/**
* DOCUMENT ME!
*
* @return
*/
public String getScreenDescription() {
return screenDescription;
}
/**
* DOCUMENT ME!
*
* @param uiScreenGV
* @param delegator
*/
public void initialize(GenericValue uiScreenGV, GenericDelegator delegator) {
setScreenId((uiScreenGV.getString("screenId") == null) ? ""
: uiScreenGV.getString(
"screenId"));
setApplicationId((uiScreenGV.getString("applicationId") == null) ? ""
: uiScreenGV.getString(
"applicationId"));
setScreenName((uiScreenGV.getString("screenName") == null) ? ""
: uiScreenGV.getString(
"screenName"));
setScreenDescription((uiScreenGV.getString("screenDescription") == null)
? "" : uiScreenGV.getString("screenDescription"));
}
/**
* DOCUMENT ME!
*
* @param screenName
* @param delegator
*
* @throws GenericEntityException
*/
public void initialize(String screenName, GenericDelegator delegator)
throws GenericEntityException {
HashMap findHashMap = new HashMap();
findHashMap.put("screenName", screenName);
List uiScreenGVL = delegator.findByAnd("UiScreen", findHashMap, null);
if (uiScreenGVL.size() == 0) {
throw new GenericEntityException("No screen with name \"" +
screenName + "\" was found in database.");
}
if (uiScreenGVL.size() > 1) {
throw new GenericEntityException(
"More than one screen found with name \"" + screenName + "\".");
}
GenericValue uiScreenGV = (GenericValue) uiScreenGVL.iterator().next();
initialize(uiScreenGV, delegator);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -