001 /*
002 * Copyright (c) 2009 The openGion Project.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
013 * either express or implied. See the License for the specific language
014 * governing permissions and limitations under the License.
015 */
016 package org.opengion.fukurou.model;
017
018 /**
019 * [PN],[OYA] ãªã©ã® [] ã§æŒ?®šã•れãŸã‚«ãƒ©ãƒ?§è¡¨ã•れãŸãƒ•ォーマットデータã«å¯¾ã—ã¦ã€?
020 * DBTableModelオブジェクトをé©ç”¨ã—㦠å?‚«ãƒ©ãƒ?«å®Ÿãƒ‡ãƒ¼ã‚¿ã‚’割り当ã¦ã‚‹ã‚ªãƒ–ジェクトã§ã™ã?
021 *
022 * @og.group ç”»é¢è¡¨ç¤º
023 *
024 * @version 4.0
025 * @author Kazuhiko Hasegawa
026 * @since JDK5.0,
027 */
028 public interface DataModel<T> {
029
030 /**
031 * row ã«ã‚るセルã®ã‚ªãƒ–ジェクトå?ã‚’ç½®ãæ›ãˆã¾ã™ã?
032 *
033 * @param vals æ–°ã—ã„é…å?値ã€?
034 * @param row 値ãŒå¤‰æ›´ã•れるè¡?無視ã•れã¾ã?
035 */
036 void setValues( final T[] vals,final int row ) ;
037
038 /**
039 * カラãƒ?ã«å¯¾å¿œã™ã‚?カラãƒ?•ªå·ã‚’è¿”ã—ã¾ã™ã?
040 *
041 * 特殊ãªã‚«ãƒ©ãƒ?ŒæŒ?®šã•れãŸå ´åˆã?ã€è²??値を返ã—ã¾ã™ã?
042 * 例ãˆã°ã€[KEY.カラãƒ?]ã€[I]ã€[ROW.ID] ãªã©ã€ç‰¹å®šã?è²??値を返ã—ã¾ã™ã?
043 * ã¾ãŸã?カラãƒ?ãŒå?ã®ãƒ??タモãƒ?ƒ«ã«å˜åœ¨ã—ãªã??åˆã‚‚ã€è²??値ã‹ã?
044 * Exception ã‚’è¿”ã—ã¾ã™ã?è²??値ãªã®ã‹ã?Exception ãªã®ã‹ã?ã€?
045 * 実è£?«ä¾å˜ã—ã¾ã™ã?
046 *
047 * @param columnName 値ãŒå‚ç…§ã•れるカラãƒ?•ªå·
048 *
049 * @return æŒ?®šã•れãŸã‚»ãƒ«ã®ã‚«ãƒ©ãƒ?•ªå·
050 */
051 int getColumnNo( final String columnName ) ;
052
053 /**
054 * カラãƒ?é…å?ã‚’è¿”ã—ã¾ã™ã?
055 * é…å?オブジェクトã?ã€clone ã•れãŸã‚³ãƒ”ã?ã‚’è¿”ã—ã¾ã™ã?
056 *
057 * @return カラãƒ?é…å?
058 */
059 String[] getNames();
060
061 /**
062 * row ã«ã‚るセルã®å±žæ?値をé?列ã§è¿”ã—ã¾ã™ã?
063 *
064 * @param row 値ãŒå‚ç…§ã•れるè¡?
065 *
066 * @return æŒ?®šã•れãŸã‚»ãƒ«ã®å±žæ?値
067 */
068 T[] getValues( int row ) ;
069
070 /**
071 * row ãŠã‚ˆã³ clm ã«ã‚るセルã®å±žæ?値を返ã—ã¾ã™ã?
072 *
073 * @param row 値ãŒå‚ç…§ã•れるè¡?
074 * @param clm 値ãŒå‚ç…§ã•れるå?
075 *
076 * @return æŒ?®šã•れãŸã‚»ãƒ«ã®å€¤ T
077 */
078 T getValue(int row, int clm) ;
079
080 /**
081 * clm ã®Nativeタイプを返ã—ã¾ã™ã?
082 * Nativeタイプã?org.opengion.fukurou.model.NativeTypeã§å®šç¾©ã•れã¦ã?¾ã™ã?
083 *
084 * @og.rev 4.1.1.2 (2008/02/28) æ–°è¦è¿½åŠ?
085 *
086 * @param clm 値ãŒå‚ç…§ã•れるå?
087 *
088 * @return Nativeタイ�
089 * @see org.opengion.fukurou.model.NativeType
090 */
091 NativeType getNativeType( int clm );
092 }