Package java.beans

Examples of java.beans.PropertyDescriptor


      }
      EntityType myType=Model.getEntityType(clazz);
      OqlBuilder<T> builder=OqlBuilder.from(myType.getEntityName(), "restrictField");
     
      String[] ids=StringUtils.split(text,",");
      PropertyDescriptor pd=BeanUtils.getPropertyDescriptor(clazz, field.getKeyName());
      Class<?> propertyType=pd.getReadMethod().getReturnType();
      List<Object> realIds=CollectUtils.newArrayList(ids.length);
      for(String id:ids){
        Object realId=ConvertUtils.convert(id, propertyType);
        realIds.add(realId);
      }
View Full Code Here


  public PropertyDescriptor[] getPropertyDescriptors()
  {
    try
    {
      PropertyDescriptor[] s_dscrs = new PropertyDescriptor[3];
      s_dscrs[0] = new PropertyDescriptor(WindowState.IPropertyNames.BOUNDS,
                        WindowState.class,
                        "getBounds", "setBounds");
      s_dscrs[1] = new PropertyDescriptor(WindowState.IPropertyNames.VISIBLE,
                        WindowState.class,
                        "isVisible", "setVisible");
      s_dscrs[2] = new PropertyDescriptor(WindowState.IPropertyNames.FRAME_EXTENDED_STATE,
          WindowState.class,
          "getFrameExtendedState", "setFrameExtendedState");
     
      return s_dscrs;
    }
View Full Code Here

  {
    try
    {
      PropertyDescriptor[] result = new PropertyDescriptor[4];
      result[0] =
        new PropertyDescriptor(
          FontInfo.IPropertyNames.FAMILY,
          FontInfo.class,
          "getFamily",
          "setFamily");
      result[1] =
        new PropertyDescriptor(
          FontInfo.IPropertyNames.IS_BOLD,
          FontInfo.class,
          "isBold",
          "setIsBold");
      result[2] =
        new PropertyDescriptor(
          FontInfo.IPropertyNames.IS_ITALIC,
          FontInfo.class,
          "isItalic",
          "setIsItalic");
      result[3] =
        new PropertyDescriptor(
          FontInfo.IPropertyNames.SIZE,
          FontInfo.class,
          "getSize",
          "setSize");
     
View Full Code Here

      }
      final List<IXMLElement> children = beanElement.getChildren();
      for (Iterator<IXMLElement> it = children.iterator(); it.hasNext();)
      {
        final IXMLElement propElem = it.next();
        final PropertyDescriptor curProp = props.get(propElem.getName());
        if (curProp != null)
        {
          loadProperty(bean, curProp, propElem);
        }
      }
View Full Code Here

      if (s_dscrs == null)
      {
        final Class<BestRowIdentifierAdapter> clazz =
            BestRowIdentifierAdapter.class;
        final PropertyDescriptor[] sub = new PropertyDescriptor[7];
        sub[0] = new PropertyDescriptor(COLUMN_NAME, clazz, "getColumnName", null);
        sub[0].setDisplayName(s_stringMgr.getString("BestRowIdentifierAdapterBeanInfo.columnName"));
        sub[1] = new PropertyDescriptor(SQL_DATA_TYPE, clazz, "getSQLDataType", null);
        sub[1].setDisplayName(s_stringMgr.getString("BestRowIdentifierAdapterBeanInfo.sqlDataType"));
        sub[2] = new PropertyDescriptor(TYPE_NAME, clazz, "getTypeName", null);
        sub[2].setDisplayName(s_stringMgr.getString("BestRowIdentifierAdapterBeanInfo.typeName"));
        sub[3] = new PropertyDescriptor(PRECISION, clazz, "getPrecision", null);
        sub[3].setDisplayName(s_stringMgr.getString("BestRowIdentifierAdapterBeanInfo.precision"));
        sub[4] = new PropertyDescriptor(SCALE, clazz, "getScale", null);
        sub[4].setDisplayName(s_stringMgr.getString("BestRowIdentifierAdapterBeanInfo.scale"));
        sub[5] = new PropertyDescriptor(SCOPE, clazz, "getScope", null);
        sub[5].setDisplayName(s_stringMgr.getString("BestRowIdentifierAdapterBeanInfo.scope"));
        sub[6] = new PropertyDescriptor(PSEUDO, clazz, "getPseudoColumn", null);
        sub[6].setDisplayName(s_stringMgr.getString("BestRowIdentifierAdapterBeanInfo.pseudo"));
        PropertyDescriptor[] base = new PropertyDescriptor[0];
        s_dscrs = new PropertyDescriptor[base.length + sub.length];
        System.arraycopy(base, 0, s_dscrs, 0, base.length);
        System.arraycopy(sub, 0, s_dscrs, base.length, sub.length);
View Full Code Here

  {
    try
    {
      PropertyDescriptor[] result = new PropertyDescriptor[1];
      result[0] =
        new PropertyDescriptor(
          UidIdentifier.IPropertyNames.STRING,
          UidIdentifier.class,
          "toString",
          "setString");
     
View Full Code Here

  public PropertyDescriptor[] getPropertyDescriptors()
  {
    try
    {
      PropertyDescriptor[] result = new PropertyDescriptor[7];
      result[0] = new PropertyDescriptor(IPropertyNames.NAME, SQLDriver.class, "getName", "setName");
      result[1] =
        new PropertyDescriptor(IPropertyNames.DRIVER_CLASS, SQLDriver.class, "getDriverClassName",
          "setDriverClassName");
      result[2] =
        new PropertyDescriptor(IPropertyNames.ID, SQLDriver.class, "getIdentifier", "setIdentifier");
      result[3] = new PropertyDescriptor(IPropertyNames.URL, SQLDriver.class, "getUrl", "setUrl");
      result[4] =
        new PropertyDescriptor(IPropertyNames.JARFILE_NAME, SQLDriver.class, "getJarFileName",
          "setJarFileName");
      result[5] =
        new IndexedPropertyDescriptor(IPropertyNames.JARFILE_NAMES, SQLDriver.class,
          "getJarFileNameWrappers", "setJarFileNameWrappers", "getJarFileNameWrapper",
          "setJarFileNameWrapper");
      result[6] =
        new PropertyDescriptor(IPropertyNames.WEBSITE_URL, SQLDriver.class, "getWebSiteUrl",
          "setWebSiteUrl");
      return result;
    }
    catch (IntrospectionException e)
    {
View Full Code Here

    {
      if (s_dscrs == null)
      {
        PropertyDescriptor[] sub = new PropertyDescriptor[2];
        final Class<ForeignKeyInfo> clazz = ForeignKeyInfo.class;
        sub[0] = new PropertyDescriptor(PK_CATALOG_NAME,
                clazz, "getPrimaryKeyCatalogName", null);
        sub[1] = new PropertyDescriptor(PK_SCHEMA_NAME,
                clazz, "getPrimaryKeySchemaName", null);
        PropertyDescriptor[] base = super.getPropertyDescriptors();
        if (base == null)
        {
          base = new PropertyDescriptor[0];
View Full Code Here

      if (s_dscrs == null)
      {
        s_dscrs = new PropertyDescriptor[4];
        final Class<DatabaseObjectInfo> clazz = DatabaseObjectInfo.class;
        int idx = 0;
        s_dscrs[idx++] = new PropertyDescriptor(
                DatabaseObjectInfo.IPropertyNames.CATALOG_NAME,
                clazz, "getCatalogName", null);
        s_dscrs[idx++] = new PropertyDescriptor(
                DatabaseObjectInfo.IPropertyNames.SCHEMA_NAME,
                clazz, "getSchemaName", null);
        s_dscrs[idx++] = new PropertyDescriptor(
                DatabaseObjectInfo.IPropertyNames.SIMPLE_NAME,
                clazz, "getSimpleName", null);
        s_dscrs[idx++] = new PropertyDescriptor(
                DatabaseObjectInfo.IPropertyNames.QUALIFIED_NAME,
                clazz, "getQualifiedName", null);
      }
    }
  }
View Full Code Here

  public PropertyDescriptor[] getPropertyDescriptors()
  {
    try
    {
      PropertyDescriptor[] result = new PropertyDescriptor[3];
      result[0] = new PropertyDescriptor(NAME, SQLDriverProperty.class, "getName", "setName");
      result[1] = new PropertyDescriptor(VALUE, SQLDriverProperty.class, "getValue", "setValue");
      result[2] =
        new PropertyDescriptor(IS_SPECIFIED, SQLDriverProperty.class, "isSpecified", "setIsSpecified");
      return result;
    }
    catch (IntrospectionException e)
    {
      throw new Error(e);
View Full Code Here

TOP

Related Classes of java.beans.PropertyDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.