whats the difference between
>       public boolean isReadOnly() {
>           //ToDo: implementation
>           return false;
>       }
>
and

>       public boolean isWritable() {
>           //ToDo: implementation
>           return false;
>        }




we might wanna call this isIndexed
>       public boolean isSearchable() {
>           //ToDo: implementation
>           return false;
>       }
>


- Kasper

----- Original Message ----- >
>   1.1
jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/data/impl/A
bstractColumn.java
>
>   Index: AbstractColumn.java
>   ===================================================================
>
>   /*
>    * Copyright (C) The Apache Software Foundation. All rights reserved.
>    *
>    * This software is published under the terms of the Apache Software
License
>    * version 1.1, a copy of which has been included with this distribution
in
>    * the LICENSE file.
>    */
>   package org.apache.avalon.db.data.impl;
>
>
>
>   import org.apache.avalon.db.data.Table;
>   import org.apache.avalon.db.data.Queryable;
>   import org.apache.avalon.db.data.Column;
>
>
>   /**
>    * Class AbstractColumn
>    *
>    *
>    * @author Paul Hammant <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
>    * @author Gerhard Froehlich <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>*
>    * @version $Revision: 1.1 $
>    */
>   public abstract class AbstractColumn implements Column {
>
>       protected String mName;
>       protected String mSqlType;
>       protected String mJavaType;
>
>       /**
>        * Constructor AbstractColumn
>        *
>        *
>        * @param name
>        * @param sqlType
>        * @param javaType
>        *
>        */
>       public AbstractColumn(String name, String sqlType, String javaType)
{
>
>           mName = name;
>           mSqlType = sqlType;
>           mJavaType = javaType;
>       }
>
>       /**
>        * Method getSQLType
>        *
>        *
>        * @return
>        *
>        */
>       public String getSQLType() {
>           return mSqlType;
>       }
>
>       /**
>        * Method getName
>        *
>        *
>        * @return
>        *
>        */
>       public String getName() {
>           return mName;
>       }
>
>       /**
>        * Method getJavaType
>        *
>        *
>        * @return
>        *
>        */
>       public String getJavaType() {
>           return mJavaType;
>       }
>
>       /** methods for the metadata */
>       public int getColumnDisplaySize() {
>           //ToDo: implementation
>           return 0;
>       }
>
>       public String getColumnLabel() {
>           return mName;
>       }
>
>       public String getColumnName() {
>           return mName;
>       }
>
>       public int getColumnType() {
>           //ToDo: implementation
>           return 0;
>       }
>
>       public String getColumnTypeName() {
>           return mSqlType;
>       }
>
>       public int getPrecision() {
>           //ToDo: implementation
>           return 0;
>       }
>
>       public int getScale() {
>           //ToDo: implementation
>           return 0;
>       }
>
>       public String getSchemaName() {
>           //ToDo: implementation
>           return null;
>       }
>
>       public String getCatalogName() {
>           //ToDo: implementation
>           return null;
>       }
>
>       public String getColumnClassName() {
>           //ToDo: implementation
>           return null;
>       }
>
>       public String getTableName() {
>           //ToDo: implementation
>           return null;
>       }
>
>       public boolean isAutoIncrement() {
>           //ToDo: implementation
>           return false;
>       }
>
>       public boolean isCaseSensitive() {
>           //ToDo: implementation
>           return false;
>       }
>
>       public boolean isCurrency() {
>           //ToDo: implementation
>           return false;
>       }
>
>       public boolean isDefinitelyWritable() {
>           //ToDo: implementation
>           return false;
>       }
>
>       public int isNullable() {
>           //ToDo: implementation
>           return 0;
>       }
>
>       public boolean isReadOnly() {
>           //ToDo: implementation
>           return false;
>       }
>
>       public boolean isSearchable() {
>           //ToDo: implementation
>           return false;
>       }
>
>       public boolean isSigned() {
>           //ToDo: implementation
>           return false;
>       }
>
>       public boolean isWritable() {
>           //ToDo: implementation
>           return false;
>        }
>
>   }
>
>
>
>   1.1
jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/data/impl/V
arCharColumn.java
>
>   Index: VarCharColumn.java
>   ===================================================================
>
>   /*
>    * Copyright (C) The Apache Software Foundation. All rights reserved.
>    *
>    * This software is published under the terms of the Apache Software
License
>    * version 1.1, a copy of which has been included with this distribution
in
>    * the LICENSE file.
>    */
>   package org.apache.avalon.db.data.impl;
>
>
>
>   import org.apache.avalon.db.data.Table;
>   import org.apache.avalon.db.data.Queryable;
>   import org.apache.avalon.db.data.Column;
>   import org.apache.avalon.db.data.ValidationException;
>
>
>   /**
>    * Class VarCharColumn
>    *
>    *
>    * @author Paul Hammant <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
>    * @author Gerhard Froehlich <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>*
>    * @version $Revision: 1.1 $
>    */
>   public class VarCharColumn extends AbstractColumn {
>
>       private int mMaxLength;
>
>       /**
>        * Constructor VarCharColumn
>        *
>        *
>        * @param name
>        * @param maxLength
>        * @param javaType
>        *
>        */
>       public VarCharColumn(String name, int maxLength) {
>           super(name,"varchar",String.class.getName());
>           mMaxLength = maxLength;
>       }
>
>       public void test(Object obj) throws ValidationException {
>           String str = (String) obj;
>           if (str.length() > mMaxLength) {
>               throw new ValidationException("String " + mName + "at is too
long at " + str.length());
>           }
>       }
>
>
>
>   }
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to