FDO .NET API Reference Feature Data Objects

mgPropertyValueConstraintList.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (C) 2004-2006  Autodesk, Inc.
00003 * 
00004 * This library is free software; you can redistribute it and/or
00005 * modify it under the terms of version 2.1 of the GNU Lesser
00006 * General Public License as published by the Free Software Foundation.
00007 * 
00008 * This library is distributed in the hope that it will be useful,
00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 * Lesser General Public License for more details.
00012 * 
00013 * You should have received a copy of the GNU Lesser General Public
00014 * License along with this library; if not, write to the Free Software
00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00016 *
00017 */
00018 
00019 #pragma once
00020 
00021 #include "FDO\Schema\mgPropertyValueConstraintType.h"
00022 
00023 class FdoPropertyValueConstraintList;
00024 
00025 BEGIN_NAMESPACE_OSGEO_FDO_EXPRESSION
00026 public __gc class DataValueCollection;
00027 END_NAMESPACE_OSGEO_FDO_EXPRESSION
00028 
00029 BEGIN_NAMESPACE_OSGEO_FDO_SCHEMA
00030 
00031 /// \ingroup (OSGeoFDOSchema)
00032 /// \brief
00033 /// PropertyValueConstraintList is used to specify a list of allowed values for a particular property. 
00034 /// It can be used for all data property types except for Boolean, BLOB, or CLOB.
00035 /// This constraint is represented by a list of values of the same type as the corresponding data property. 
00036 /// The list cannot be empty. The list could be a single value. While that may not seem very useful it could serve as a 
00037 /// temporary way to enforce a single value for a property, e.g. for a particular customer, Parcel.State is always ‘CA? 
00038 /// In this case, the definer of the property definition probably should also set the default value to be the same, unless it can be null.
00039 /// The list does not need to be ordered. However, a provider may choose to reorder the list so the list that is returned when 
00040 /// a user gets the definition of this constraint for a property may be different than the order that was given when defined.
00041 /// E.g. defined as (12, 8, 24), but returned as (8, 12, 24). If the list has duplicate values, the provider may choose to eliminate 
00042 /// duplicates from the list.
00043 /// If the data property definition allows nulls, a null value is considered as being valid regardless of this list of valid values. 
00044 /// The list of valid values should not include the null value itself, but leave the specification of whether null is allowed to 
00045 /// the null value constraint. If the data property definition includes a non-null default value, then that value should be one 
00046 /// of the values in the list.
00047 /// If both a valid values list constraint and a unique constraint on the same property are included, then the side effect is that 
00048 /// there will be an upper limit of the number of objects of that class that have non-null values for the property.
00049 public __gc class PropertyValueConstraintList : public NAMESPACE_OSGEO_FDO_SCHEMA::PropertyValueConstraint
00050 {
00051 public private:
00052     PropertyValueConstraintList(System::IntPtr unmanaged, System::Boolean autoDelete);
00053 
00054     inline FdoPropertyValueConstraintList* GetImpObj();
00055 
00056 public:    
00057     /// \brief
00058     /// Constructs an empty instance of an PropertyValueConstraintList.
00059     /// 
00060     /// \return
00061     /// Returns an PropertyValueConstraintList
00062     /// 
00063     PropertyValueConstraintList();
00064 
00065     /// \brief
00066     /// Returns the list of allowed values for a particular property.
00067     /// 
00068     /// \return
00069     /// Returns an instance of DataValueCollection.
00070     /// 
00071     __property NAMESPACE_OSGEO_FDO_EXPRESSION::DataValueCollection* get_ConstraintList();
00072     
00073 };
00074 
00075 END_NAMESPACE_OSGEO_FDO_SCHEMA
00076 
00077 

Comments or suggestions? Send us feedback.