1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 import com.sun.star.uno.*;
25 import com.sun.star.beans.*;
26 import com.sun.star.awt.*;
27 import com.sun.star.container.*;
28 import com.sun.star.form.*;
29 import com.sun.star.lang.*;
30 import com.sun.star.sdb.*;
31 import com.sun.star.sdbcx.*;
32 
33 public class UNO
34 {
queryPropertySet( Object aObject )35 	public static XPropertySet queryPropertySet( Object aObject )
36 	{
37 		return (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, aObject );
38 	}
queryControlModel( Object aObject )39 	public static XControlModel queryControlModel( Object aObject )
40 	{
41 		return (XControlModel)UnoRuntime.queryInterface( XControlModel.class, aObject );
42 	}
queryIndexContainer( Object aObject )43 	public static XIndexContainer queryIndexContainer( Object aObject )
44 	{
45 		return (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, aObject );
46 	}
queryReset( Object aObject )47 	public static XReset queryReset( Object aObject )
48 	{
49 		return (XReset)UnoRuntime.queryInterface( XReset.class, aObject );
50 	}
queryServiceInfo( Object aObject )51 	public static XServiceInfo queryServiceInfo( Object aObject )
52 	{
53 		return (XServiceInfo)UnoRuntime.queryInterface( XServiceInfo.class, aObject );
54 	}
queryColumn( Object aObject )55 	public static XColumn queryColumn( Object aObject )
56 	{
57 		return (XColumn)UnoRuntime.queryInterface( XColumn.class, aObject );
58 	}
59 
queryComponent( Object aObject )60 	public static XComponent queryComponent( Object aObject )
61 	{
62 		return (XComponent)UnoRuntime.queryInterface( XComponent.class, aObject );
63 	}
64 
queryTablesSupplier( Object aObject )65 	public static XTablesSupplier queryTablesSupplier( Object aObject )
66 	{
67 		return (XTablesSupplier)UnoRuntime.queryInterface( XTablesSupplier.class, aObject );
68 	}
69 
70 /*	replace Foo with the identifier of your choice.
71 
72 	Why does Java not have templates?
73 
74 	public static XFoo queryFoo( Object aObject )
75 	{
76 		return (XFoo)UnoRuntime.queryInterface( XFoo.class, aObject );
77 	}
78 */
79 };
80