Esempio n. 1
0
        /// <summary>
        ///   returns the vectors cells default value
        ///   if the field is not a vector returns field default value
        /// </summary>
        public String getCellDefualtValue()
        {
            String val = null;

            if (_type == StorageAttribute.BLOB_VECTOR)
            {
                if (_nullDefault && _nullValue != null)
                {
                    val = _nullValue;
                }
                else if (DefaultValue != null)
                {
                    val = DefaultValue;
                }
                else
                {
                    val = getMagicDefaultValue(_vecCellsType);
                    if (_vecCellsType == StorageAttribute.BLOB)
                    {
                        val = BlobType.setContentType(val, _vecCellsContentType);
                    }
                }
            }
            else
            {
                val = getDefaultValue();
            }

            return(val);
        }
Esempio n. 2
0
        /// <summary>
        ///   return the magic default value according to the type
        /// </summary>
        public String getMagicDefaultValue()
        {
            String val = getMagicDefaultValue(_type);

            if (_type == StorageAttribute.BLOB)
            {
                val = BlobType.setContentType(val, _contentType);
            }
            else if (_type == StorageAttribute.BLOB_VECTOR)
            {
                val = BlobType.SetVecCellAttr(val, _vecCellsType);
                if (_vecCellsType == StorageAttribute.BLOB)
                {
                    val = BlobType.setContentType(val, _vecCellsContentType);
                }
            }

            return(val);
        }