001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.wicket.markup.html.list;
018
019import org.apache.wicket.markup.html.WebMarkupContainer;
020import org.apache.wicket.model.IModel;
021
022/**
023 * A very simple Item. Usually it is used as based class for more advanced Items.
024 * 
025 * @author Juergen Donnerstag
026 */
027public class AbstractItem extends WebMarkupContainer
028{
029        private static final long serialVersionUID = 1L;
030
031        /**
032         * Constructor
033         * 
034         * @param id
035         *            component id
036         * @param model
037         *            model for this item
038         */
039        public AbstractItem(final String id, final IModel<?> model)
040        {
041                super(id.intern(), model);
042        }
043
044        /**
045         * Constructor
046         * 
047         * @param id
048         *            component id
049         */
050        public AbstractItem(final String id)
051        {
052                super(id.intern());
053        }
054
055        /**
056         * Constructor
057         * 
058         * @param id
059         *            component id
060         * @param model
061         *            model for this item
062         */
063        public AbstractItem(final long id, final IModel<?> model)
064        {
065                this(Long.toString(id), model);
066        }
067
068        /**
069         * Constructor
070         * 
071         * @param id
072         *            component id
073         */
074        public AbstractItem(final long id)
075        {
076                this(Long.toString(id));
077        }
078}