⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modelkey.java

📁 一个非常好的FRAMWRK!是一个外国组织做的!不!
💻 JAVA
字号:
/**
 * Copyright 2003-2005 the original author or authors.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */

package com.jdon.model;

/**
 * 用于实现Model缓存的Key
 *
 * <p>Copyright: Jdon.com Copyright (c) 2005</p>
 * <p></p>
 * @author banq
 * @version JdonFramework 2005 v1.0
 */
public class ModelKey {

  private Object dataKey;
  private String formName;
  private Class  modelClass;

  public ModelKey(Object dataKey, String formName){
    this.dataKey = dataKey;
    this.formName = formName;
  }

  public ModelKey(Object dataKey, Class  modelClass){
    this.dataKey = dataKey;
    this.modelClass = modelClass;
  }


  public Object getDataKey() {
    return dataKey;
  }
  public String getFormName() {
    return formName;
  }
  public Class getModelClassName() {
    return modelClass;
  }
  public void setDataKey(Object dataKey) {
    this.dataKey = dataKey;
  }
  public void setFormName(String formName) {
    this.formName = formName;
  }
  public void setModelClassName(Class  modelClass) {
    this.modelClass = modelClass;
  }

  /**
   * 最好不使用本方法,容易和真正的CacheKey混淆
   * @return String
   */
  public String toString(){
    StringBuffer buf = new StringBuffer("ModelKey include: dataKey=");
    buf.append(dataKey);
    if (modelClass != null)
       buf.append(" modelClass =").append(modelClass);
    else if (formName != null)
      buf.append(" formName =").append(formName);
    return buf.toString();
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -