01: package org.tigris.scarab.om;
02:
03: import java.util.List;
04:
05: import org.apache.torque.TorqueException;
06: import org.apache.torque.util.Criteria;
07:
08: /* ================================================================
09: * Copyright (c) 2000-2005 CollabNet. All rights reserved.
10: *
11: * Redistribution and use in source and binary forms, with or without
12: * modification, are permitted provided that the following conditions are
13: * met:
14: *
15: * 1. Redistributions of source code must retain the above copyright
16: * notice, this list of conditions and the following disclaimer.
17: *
18: * 2. Redistributions in binary form must reproduce the above copyright
19: * notice, this list of conditions and the following disclaimer in the
20: * documentation and/or other materials provided with the distribution.
21: *
22: * 3. The end-user documentation included with the redistribution, if
23: * any, must include the following acknowlegement: "This product includes
24: * software developed by Collab.Net <http://www.Collab.Net/>."
25: * Alternately, this acknowlegement may appear in the software itself, if
26: * and wherever such third-party acknowlegements normally appear.
27: *
28: * 4. The hosted project names must not be used to endorse or promote
29: * products derived from this software without prior written
30: * permission. For written permission, please contact info@collab.net.
31: *
32: * 5. Products derived from this software may not use the "Tigris" or
33: * "Scarab" names nor may "Tigris" or "Scarab" appear in their names without
34: * prior written permission of Collab.Net.
35: *
36: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
38: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
39: * IN NO EVENT SHALL COLLAB.NET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
40: * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
41: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
42: * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
43: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
44: * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
45: * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
46: * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47: *
48: * ====================================================================
49: *
50: * This software consists of voluntary contributions made by many
51: * individuals on behalf of Collab.Net.
52: */
53:
54: /**
55: * The skeleton for this class was autogenerated by Torque on:
56: *
57: * [Wed Feb 28 16:36:26 PST 2001]
58: *
59: * You should add additional methods to this class to meet the
60: * application requirements. This class will only be generated as
61: * long as it does not already exist in the output directory.
62: */
63: public class AttributeOptionPeer extends BaseAttributeOptionPeer {
64: /**
65: * Returns an ordered attribute_options list
66: * @return
67: */
68: public static List getSortedAttributeOptions()
69: throws TorqueException {
70: List attributeOptions = null;
71: final Criteria crit = new Criteria();
72: crit
73: .addAscendingOrderByColumn(AttributeOptionPeer.ATTRIBUTE_ID);
74: crit.addAscendingOrderByColumn(AttributeOptionPeer.OPTION_ID);
75: attributeOptions = doSelect(crit);
76: attributeOptions.remove(0);
77: return attributeOptions;
78: }
79:
80: }
|