Package com.sun.star.beans

Examples of com.sun.star.beans.XPropertyContainer.addProperty()


            try
            {
                final String serviceName = "com.sun.star.beans.PropertyBag";
                final XPropertyContainer column = UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.xMSF.createInstance(serviceName));

                column.addProperty("Type", PropertyAttribute.BOUND, DataType.VARCHAR);
                column.addProperty(PropertyNames.PROPERTY_NAME, PropertyAttribute.BOUND, PropertyNames.EMPTY_STRING);
                column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), null);
                final XPropertySet columnSet = UnoRuntime.queryInterface(XPropertySet.class, column);

                if (composer.getQuery().length() == 0)
View Full Code Here


            {
                final String serviceName = "com.sun.star.beans.PropertyBag";
                final XPropertyContainer column = UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.xMSF.createInstance(serviceName));

                column.addProperty("Type", PropertyAttribute.BOUND, DataType.VARCHAR);
                column.addProperty(PropertyNames.PROPERTY_NAME, PropertyAttribute.BOUND, PropertyNames.EMPTY_STRING);
                column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), null);
                final XPropertySet columnSet = UnoRuntime.queryInterface(XPropertySet.class, column);

                if (composer.getQuery().length() == 0)
                {
View Full Code Here

                final String serviceName = "com.sun.star.beans.PropertyBag";
                final XPropertyContainer column = UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.xMSF.createInstance(serviceName));

                column.addProperty("Type", PropertyAttribute.BOUND, DataType.VARCHAR);
                column.addProperty(PropertyNames.PROPERTY_NAME, PropertyAttribute.BOUND, PropertyNames.EMPTY_STRING);
                column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), null);
                final XPropertySet columnSet = UnoRuntime.queryInterface(XPropertySet.class, column);

                if (composer.getQuery().length() == 0)
                {
                    StringBuilder sql = new StringBuilder();
View Full Code Here

                        final short operator = currentControlRow.getSelectedOperator();
                        if ((operator == SQLFilterOperator.SQLNULL)
                                || (operator == SQLFilterOperator.NOT_SQLNULL)
                                || AnyConverter.isVoid(value))
                        {
                            column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), "");
                            value = new Any(new Type(TypeClass.VOID), null);
                        }
                        else
                        {
                            column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), value);
View Full Code Here

                            column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), "");
                            value = new Any(new Type(TypeClass.VOID), null);
                        }
                        else
                        {
                            column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), value);
                        }
                        columnSet.setPropertyValue("Value", value);
                        composer.getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL, nOperator);
                    }
                }
View Full Code Here

            {
                new NamedValue("AutomaticAddition", Boolean.valueOf(true))
            };
            final String serviceName = "com.sun.star.beans.PropertyBag";
            final XPropertyContainer filter = UnoRuntime.queryInterface(XPropertyContainer.class, getMSF().createInstanceWithArguments(serviceName, initArgs));
            filter.addProperty("Name", PropertyAttribute.MAYBEVOID, "Comment");
            filter.addProperty("RealName", PropertyAttribute.MAYBEVOID, "Comment");
            filter.addProperty("TableName", PropertyAttribute.MAYBEVOID, "customers");
            filter.addProperty("Value", PropertyAttribute.MAYBEVOID, "Good one.");
            filter.addProperty("Type", PropertyAttribute.MAYBEVOID, Integer.valueOf(DataType.LONGVARCHAR));
            final XPropertySet column = UnoRuntime.queryInterface(XPropertySet.class, filter);
View Full Code Here

                new NamedValue("AutomaticAddition", Boolean.valueOf(true))
            };
            final String serviceName = "com.sun.star.beans.PropertyBag";
            final XPropertyContainer filter = UnoRuntime.queryInterface(XPropertyContainer.class, getMSF().createInstanceWithArguments(serviceName, initArgs));
            filter.addProperty("Name", PropertyAttribute.MAYBEVOID, "Comment");
            filter.addProperty("RealName", PropertyAttribute.MAYBEVOID, "Comment");
            filter.addProperty("TableName", PropertyAttribute.MAYBEVOID, "customers");
            filter.addProperty("Value", PropertyAttribute.MAYBEVOID, "Good one.");
            filter.addProperty("Type", PropertyAttribute.MAYBEVOID, Integer.valueOf(DataType.LONGVARCHAR));
            final XPropertySet column = UnoRuntime.queryInterface(XPropertySet.class, filter);
View Full Code Here

            };
            final String serviceName = "com.sun.star.beans.PropertyBag";
            final XPropertyContainer filter = UnoRuntime.queryInterface(XPropertyContainer.class, getMSF().createInstanceWithArguments(serviceName, initArgs));
            filter.addProperty("Name", PropertyAttribute.MAYBEVOID, "Comment");
            filter.addProperty("RealName", PropertyAttribute.MAYBEVOID, "Comment");
            filter.addProperty("TableName", PropertyAttribute.MAYBEVOID, "customers");
            filter.addProperty("Value", PropertyAttribute.MAYBEVOID, "Good one.");
            filter.addProperty("Type", PropertyAttribute.MAYBEVOID, Integer.valueOf(DataType.LONGVARCHAR));
            final XPropertySet column = UnoRuntime.queryInterface(XPropertySet.class, filter);

            m_composer.appendFilterByColumn(column, true, SQLFilterOperator.LIKE);
View Full Code Here

            final String serviceName = "com.sun.star.beans.PropertyBag";
            final XPropertyContainer filter = UnoRuntime.queryInterface(XPropertyContainer.class, getMSF().createInstanceWithArguments(serviceName, initArgs));
            filter.addProperty("Name", PropertyAttribute.MAYBEVOID, "Comment");
            filter.addProperty("RealName", PropertyAttribute.MAYBEVOID, "Comment");
            filter.addProperty("TableName", PropertyAttribute.MAYBEVOID, "customers");
            filter.addProperty("Value", PropertyAttribute.MAYBEVOID, "Good one.");
            filter.addProperty("Type", PropertyAttribute.MAYBEVOID, Integer.valueOf(DataType.LONGVARCHAR));
            final XPropertySet column = UnoRuntime.queryInterface(XPropertySet.class, filter);

            m_composer.appendFilterByColumn(column, true, SQLFilterOperator.LIKE);
            assertTrue("At least one row should exist", m_database.getConnection().createStatement().executeQuery(m_composer.getQuery()).next());
View Full Code Here

            final XPropertyContainer filter = UnoRuntime.queryInterface(XPropertyContainer.class, getMSF().createInstanceWithArguments(serviceName, initArgs));
            filter.addProperty("Name", PropertyAttribute.MAYBEVOID, "Comment");
            filter.addProperty("RealName", PropertyAttribute.MAYBEVOID, "Comment");
            filter.addProperty("TableName", PropertyAttribute.MAYBEVOID, "customers");
            filter.addProperty("Value", PropertyAttribute.MAYBEVOID, "Good one.");
            filter.addProperty("Type", PropertyAttribute.MAYBEVOID, Integer.valueOf(DataType.LONGVARCHAR));
            final XPropertySet column = UnoRuntime.queryInterface(XPropertySet.class, filter);

            m_composer.appendFilterByColumn(column, true, SQLFilterOperator.LIKE);
            assertTrue("At least one row should exist", m_database.getConnection().createStatement().executeQuery(m_composer.getQuery()).next());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.