diff --git a/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaBalanceDao.java b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaBalanceDao.java new file mode 100644 index 00000000000..e2543ec428e --- /dev/null +++ b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaBalanceDao.java @@ -0,0 +1,34 @@ +//Licensed to the Apache Software Foundation (ASF) under one +//or more contributor license agreements. See the NOTICE file +//distributed with this work for additional information +//regarding copyright ownership. The ASF licenses this file +//to you under the Apache License, Version 2.0 (the +//"License"); you may not use this file except in compliance +//with the License. You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, +//software distributed under the License is distributed on an +//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +//KIND, either express or implied. See the License for the +//specific language governing permissions and limitations +//under the License. +package org.apache.cloudstack.quota.dao; + +import java.util.List; + +import org.apache.cloudstack.quota.QuotaBalanceVO; + +import com.cloud.utils.Pair; +import com.cloud.utils.db.Filter; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.db.SearchCriteria; + +public interface QuotaBalanceDao extends GenericDao { + + Pair, Integer> searchBalance(SearchCriteria sc, Filter filter); + + void saveQuotaBalance(List credits); + +} diff --git a/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaBalanceDaoImpl.java b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaBalanceDaoImpl.java new file mode 100644 index 00000000000..5473aa19cc8 --- /dev/null +++ b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaBalanceDaoImpl.java @@ -0,0 +1,48 @@ +//Licensed to the Apache Software Foundation (ASF) under one +//or more contributor license agreements. See the NOTICE file +//distributed with this work for additional information +//regarding copyright ownership. The ASF licenses this file +//to you under the Apache License, Version 2.0 (the +//"License"); you may not use this file except in compliance +//with the License. You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, +//software distributed under the License is distributed on an +//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +//KIND, either express or implied. See the License for the +//specific language governing permissions and limitations +//under the License. +package org.apache.cloudstack.quota.dao; + +import java.util.List; + +import javax.ejb.Local; + +import org.springframework.stereotype.Component; +import org.apache.cloudstack.quota.QuotaBalanceVO; + +import com.cloud.utils.Pair; +import com.cloud.utils.db.Filter; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchCriteria; + +@Component +@Local(value = {QuotaBalanceDao.class}) +public class QuotaBalanceDaoImpl extends GenericDaoBase implements QuotaBalanceDao { + + @Override + public Pair, Integer> searchBalance( + SearchCriteria sc, Filter filter) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void saveQuotaBalance(List credits) { + // TODO Auto-generated method stub + + } + +} diff --git a/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaEmailTemplatesDao.java b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaEmailTemplatesDao.java new file mode 100644 index 00000000000..7a55beca4d1 --- /dev/null +++ b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaEmailTemplatesDao.java @@ -0,0 +1,35 @@ +//Licensed to the Apache Software Foundation (ASF) under one +//or more contributor license agreements. See the NOTICE file +//distributed with this work for additional information +//regarding copyright ownership. The ASF licenses this file +//to you under the Apache License, Version 2.0 (the +//"License"); you may not use this file except in compliance +//with the License. You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, +//software distributed under the License is distributed on an +//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +//KIND, either express or implied. See the License for the +//specific language governing permissions and limitations +//under the License. +package org.apache.cloudstack.quota.dao; + +import java.util.List; + +import org.apache.cloudstack.quota.QuotaBalanceVO; +import org.apache.cloudstack.quota.QuotaEmailTemplatesVO; + +import com.cloud.utils.Pair; +import com.cloud.utils.db.Filter; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.db.SearchCriteria; + +public interface QuotaEmailTemplatesDao extends GenericDao { + + QuotaEmailTemplatesVO fetchTemplate(String templateName); + + Pair, Integer> searchBalance(SearchCriteria sc, Filter filter); + +} diff --git a/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaEmailTemplatesDaoImpl.java b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaEmailTemplatesDaoImpl.java new file mode 100644 index 00000000000..75cad5e5951 --- /dev/null +++ b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaEmailTemplatesDaoImpl.java @@ -0,0 +1,49 @@ +//Licensed to the Apache Software Foundation (ASF) under one +//or more contributor license agreements. See the NOTICE file +//distributed with this work for additional information +//regarding copyright ownership. The ASF licenses this file +//to you under the Apache License, Version 2.0 (the +//"License"); you may not use this file except in compliance +//with the License. You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, +//software distributed under the License is distributed on an +//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +//KIND, either express or implied. See the License for the +//specific language governing permissions and limitations +//under the License. +package org.apache.cloudstack.quota.dao; + +import java.util.List; + +import javax.ejb.Local; + +import org.springframework.stereotype.Component; +import org.apache.cloudstack.quota.QuotaBalanceVO; +import org.apache.cloudstack.quota.QuotaEmailTemplatesVO; + +import com.cloud.utils.Pair; +import com.cloud.utils.db.Filter; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchCriteria; + +@Component +@Local(value = {QuotaEmailTemplatesDao.class}) +public class QuotaEmailTemplatesDaoImpl extends GenericDaoBase implements QuotaEmailTemplatesDao { + + @Override + public QuotaEmailTemplatesVO fetchTemplate(String templateName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Pair, Integer> searchBalance( + SearchCriteria sc, Filter filter) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaSentEmailsDao.java b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaSentEmailsDao.java new file mode 100644 index 00000000000..a53ff183fd9 --- /dev/null +++ b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaSentEmailsDao.java @@ -0,0 +1,32 @@ +//Licensed to the Apache Software Foundation (ASF) under one +//or more contributor license agreements. See the NOTICE file +//distributed with this work for additional information +//regarding copyright ownership. The ASF licenses this file +//to you under the Apache License, Version 2.0 (the +//"License"); you may not use this file except in compliance +//with the License. You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, +//software distributed under the License is distributed on an +//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +//KIND, either express or implied. See the License for the +//specific language governing permissions and limitations +//under the License. +package org.apache.cloudstack.quota.dao; + +import java.util.List; + +import org.apache.cloudstack.quota.QuotaSentEmailsVO; + +import com.cloud.utils.Pair; +import com.cloud.utils.db.Filter; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.db.SearchCriteria; + +public interface QuotaSentEmailsDao extends GenericDao { + + Pair, Integer> searchEmails(SearchCriteria sc, Filter filter); + +} diff --git a/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaSentEmailsDaoImpl.java b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaSentEmailsDaoImpl.java new file mode 100644 index 00000000000..0b0d930da86 --- /dev/null +++ b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaSentEmailsDaoImpl.java @@ -0,0 +1,42 @@ +//Licensed to the Apache Software Foundation (ASF) under one +//or more contributor license agreements. See the NOTICE file +//distributed with this work for additional information +//regarding copyright ownership. The ASF licenses this file +//to you under the Apache License, Version 2.0 (the +//"License"); you may not use this file except in compliance +//with the License. You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, +//software distributed under the License is distributed on an +//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +//KIND, either express or implied. See the License for the +//specific language governing permissions and limitations +//under the License. +package org.apache.cloudstack.quota.dao; + +import java.util.List; + +import javax.ejb.Local; + +import org.springframework.stereotype.Component; +import org.apache.cloudstack.quota.QuotaSentEmailsVO; + +import com.cloud.utils.Pair; +import com.cloud.utils.db.Filter; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchCriteria; + +@Component +@Local(value = {QuotaSentEmailsDao.class}) +public class QuotaSentEmailsDaoImpl extends GenericDaoBase implements QuotaSentEmailsDao { + + @Override + public Pair, Integer> searchEmails( + SearchCriteria sc, Filter filter) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaUsageDao.java b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaUsageDao.java new file mode 100644 index 00000000000..234bc7ab2bd --- /dev/null +++ b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaUsageDao.java @@ -0,0 +1,34 @@ +//Licensed to the Apache Software Foundation (ASF) under one +//or more contributor license agreements. See the NOTICE file +//distributed with this work for additional information +//regarding copyright ownership. The ASF licenses this file +//to you under the Apache License, Version 2.0 (the +//"License"); you may not use this file except in compliance +//with the License. You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, +//software distributed under the License is distributed on an +//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +//KIND, either express or implied. See the License for the +//specific language governing permissions and limitations +//under the License. +package org.apache.cloudstack.quota.dao; + +import java.util.List; + +import org.apache.cloudstack.quota.QuotaUsageVO; + +import com.cloud.utils.Pair; +import com.cloud.utils.db.Filter; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.db.SearchCriteria; + +public interface QuotaUsageDao extends GenericDao { + +Pair, Integer> searchAndCountAllRecords(SearchCriteria sc, Filter filter); + +void saveQuotaUsage(List credits); + +} diff --git a/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaUsageDaoImpl.java b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaUsageDaoImpl.java new file mode 100644 index 00000000000..787d65ee783 --- /dev/null +++ b/plugins/database/quota/src/org/apache/cloudstack/quota/dao/QuotaUsageDaoImpl.java @@ -0,0 +1,47 @@ +//Licensed to the Apache Software Foundation (ASF) under one +//or more contributor license agreements. See the NOTICE file +//distributed with this work for additional information +//regarding copyright ownership. The ASF licenses this file +//to you under the Apache License, Version 2.0 (the +//"License"); you may not use this file except in compliance +//with the License. You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, +//software distributed under the License is distributed on an +//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +//KIND, either express or implied. See the License for the +//specific language governing permissions and limitations +//under the License. +package org.apache.cloudstack.quota.dao; + +import java.util.List; + +import javax.ejb.Local; + +import org.springframework.stereotype.Component;import org.apache.cloudstack.quota.QuotaUsageVO; + +import com.cloud.utils.Pair; +import com.cloud.utils.db.Filter; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchCriteria; + +@Component +@Local(value = {QuotaUsageDao.class}) +public class QuotaUsageDaoImpl extends GenericDaoBase implements QuotaUsageDao { + + @Override + public Pair, Integer> searchAndCountAllRecords( + SearchCriteria sc, Filter filter) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void saveQuotaUsage(List credits) { + // TODO Auto-generated method stub + + } + +}